This class is used to specify border settings for various entities in a Word document.

 public sealed class Border
Public NotInheritable Class Border

You cannot create a Border object using the new keyword. You must reference an existing Border using the Border property method of one of the following classes: Font, CharacterRun, Paragraph, ParagraphFormatting, Section, or TableCell.

The following sample gets the Border object of the upper left table cell of the first table in a document.


          WordApplication app = new WordApplication();
          Document doc = app.Open(@"C:\sample.doc");
          Border brdr =
               (Table)(doc.GetElements(Element.Type.Table)[0])[0, 0].Border;

          //--- Set Width to 1 point
          brdr.LineWidth = 8;
          brdr.Style = Border.LineStyle.Single;
        

          Dim app As WordApplication = New WordApplication()
          Dim doc As Document = app.Open("C:\sample.doc")
          Dim brdr As Border = _
               doc.GetElements(Element.Type.Table)(0)(0, 0).Border

          '--- Set Width to 1 point
          brdr.LineWidth = 8
          brdr.Style = Border.LineStyle.Single
        

Name

Description

Color

HasShadow

LineWidth

Padding

Reverse

Style

Name

Description

LineStyle

Location