BorderType enumeration

BorderType enumeration

Specifies sides of a border. To learn more, visit the Programming with Documents documentation article.

Members

NameDescription
NoneDefault value.
BottomSpecifies the bottom border of a paragraph or a table cell.
LeftSpecifies the left border of a paragraph or a table cell.
RightSpecifies the right border of a paragraph or a table cell.
TopSpecifies the top border of a paragraph or a table cell.
HorizontalSpecifies the horizontal border between cells in a table or between conforming paragraphs.
VerticalSpecifies the vertical border between cells in a table.
DiagonalDownSpecifies the diagonal border in a table cell.
DiagonalUpSpecifies the diagonal border in a table cell.

Examples

Shows how to insert a paragraph with a top border.

let doc = new aw.Document();
let builder = new aw.DocumentBuilder(doc);

let topBorder = builder.paragraphFormat.borders.top;
topBorder.lineWidth = 4.0;
topBorder.lineStyle = aw.LineStyle.DashSmallGap;
// Set ThemeColor only when LineWidth or LineStyle setted.
topBorder.themeColor = aw.Themes.ThemeColor.Accent1;
topBorder.tintAndShade = 0.25;

builder.writeln("Text with a top border.");

doc.save(base.artifactsDir + "Border.ParagraphTopBorder.docx");

See Also