


Index can be one of the WdBorderType constants. Use Borders (index), where index identifies the border, to return a single Border object.

For example, a table has six elements in the Borders collection, whereas a paragraph has four. The number of members in the Borders collection is finite and varies depending on the type of object. ActiveDocument.Paragraphs(1).Borders.Enable = Trueīorder objects cannot be added to the Borders collection. The following example applies the default border around the first paragraph in the active document. Use the Borders property to return the Borders collection. A collection of Border objects that represent the borders of an object. In this example, the border type is set as DoubleWave.ĭownload and install Spire.Doc for. NET offers include None, Single, Thick, Double, Hairline, Dot, DashLargeGap, DotDash, DotDotDash, Triple, ThinkThickSmallGap, ThinThinSampllGap, ThinThickThinSamllGap, ThinThickMediumGap, ThickThinMediumGap, ThickThickThinMediumGap, ThinThickLargeGap, ThickThinLargeGap, ThinThickThinLargeGap, Wave, DoubleWave, DashSamllGap, DashDotStroker, Emboss3D, Engrave3D, Outset, Inset, TwistedLines1, Cleared. You can directly set BorderType property of Borders to add page borders and set Color, Space of Left/Right properties to format borders. Borders is one property of PageSetup of Section class. NET offers Section class to allow you to create new section instance or manipulate existing section. The following screenshot presents Word with page borders after programming. This guide demonstrates how to add page borders for Word document and format them in C# and VB.NET via Spire.Doc for. All the formats of page borders can be customized, including style, color, width, margin etc. MS Word enables users to decorate Word pages to have a better layout or appearance. Solution in this guide introduces how to insert and format Word page border in C# and VB.NET. Word Page Border is one part of page background to beautify document appearance.
