![]() |
|
#1
|
|||
|
|||
|
Code:
Sub test()
Dim tbl As Word.Table
With ActiveDocument
Set tbl = .Tables.Add(Range:=Selection.Range, _
NumRows:=2, _
NumColumns:=2, _
DefaultTableBehavior:=wdWord8TableBehavior)
With tbl
.Borders(wdBorderTop).LineStyle = wdLineStyleSingle
.Borders(wdBorderRight).LineStyle = wdLineStyleSingle
.Borders(wdBorderBottom).LineStyle = wdLineStyleSingle
.Borders(wdBorderLeft).LineStyle = wdLineStyleSingle
.Borders(wdBorderHorizontal).LineStyle = wdLineStyleSingle
.Borders(wdBorderVertical).LineStyle = wdLineStyleSingle
End With
End With
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
put a border around table cells that have text in them
|
tonywatsonmail | Mail Merge | 1 | 01-31-2012 04:37 AM |
Unwanted tabs in table cells
|
deltaskye | Word | 5 | 01-27-2012 11:58 AM |
Combining Text from Table Cells
|
robmorleyuk | Word | 1 | 11-01-2011 07:24 AM |
Copy table cell formatting across multiple cells / tables
|
pakistanray | Word Tables | 2 | 10-31-2011 08:07 AM |
Share your tips for centering images in table cells
|
WaltR | Word | 4 | 01-29-2011 11:22 PM |