SetLeftBorder

SetLeftBorder(sType, nSize, nSpace, r, g, b)

Inherited From: ApiParaPr#SetLeftBorder

Specifies the border which will be displayed at the left side of the page around the specified paragraph.

Parameters:

Name Type Description
sType BorderType

The border style.

nSize pt_8

The width of the current left border measured in eighths of a point.

nSpace pt

The spacing offset to the left of the paragraph measured in points used to place this border.

r byte

Red color component value.

g byte

Green color component value.

b byte

Blue color component value.

Returns:

This method doesn't return any data.

Example

Copy code
builder.CreateFile("docx");
var oDocument = Api.GetDocument();
var oParagraph = oDocument.GetElement(0);
oParagraph.AddText("This is the first paragraph. We will add a two point orange border at its left side. ");
oParagraph.AddText("The space between the left side of the paragraph and the border is 8 points. ");
oParagraph.AddText("These sentences are used to add lines for demonstrative purposes. ");
oParagraph.AddText("These sentences are used to add lines for demonstrative purposes.");
oParagraph.SetLeftBorder("single", 16, 8, 255, 111, 61);
builder.SaveFile("docx", "SetLeftBorder.docx");
builder.CloseFile();

Resulting document