Microsoft Office Tutorials and References
In Depth Information
Creating a table in a Word 2007 document
PacktBorder[2] = PacktTable.Borders[Word.WdBorderType.
wdBorderTop];
PacktBorder[3] = PacktTable.Borders[Word.WdBorderType.
wdBorderBottom];
PacktBorder[4] = PacktTable.Borders[Word.WdBorderType.
wdBorderHorizontal];
PacktBorder[5] = PacktTable.Borders[Word.WdBorderType.
wdBorderVertical];
// Border formatting of the Table
// Loop through the border and set color for table
foreach (Word.Border pktBorder in PacktBorder)
{
// Table line style propety
pktBorder.LineStyle = Word.WdLineStyle.wdLineStyleTriple;
// Table line color property
pktBorder.Color = Word.WdColor.wdColorGray30;
}
A table with gray border gets created, as seen in the following screenshot:
 
Search JabSto ::




Custom Search