Get Started
Usage API
More information

SetRightBorder

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

Specify the border which will be displayed at the right 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 right border measured in eighths of a point.

nSpace pt

The spacing offset to the right 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");
oDocument = Api.GetDocument();
oMyStyle = oDocument.CreateStyle("My document style");
oParaPr = oMyStyle.GetParaPr();
oParaPr.SetRightBorder("single", 24, 0, 0, 255, 0);
oParagraph = oDocument.GetElement(0);
oParagraph.SetStyle(oMyStyle);
oParagraph.AddText("This is the first paragraph. ");
oParagraph.AddText("The paragraph properties styled above set a border at its right side.");
builder.SaveFile("docx", "SetRightBorder.docx");
builder.CloseFile();

Resulting document