![]() |
|
#1
|
|||
|
|||
|
I have many small tables in our monthly report.
However I don't want the table borders to appear. Is there a macro out there that can choose all of the table borders (starting from a certain bookmark or page number) and color them white? Thank you people so much for your invaluable assistance! |
|
#2
|
|||
|
|||
|
Why would you want "white" borders? Why not no borders?
Code:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oRng As Word.Range
Dim oTbl As Word.Table
Set oRng = ActiveDocument.Range
oRng.Start = ActiveDocument.Bookmarks("StartHere").Range.Start
For Each oTbl In oRng.Tables
With oTbl
.Borders(wdBorderLeft).LineStyle = wdLineStyleNone
.Borders(wdBorderRight).LineStyle = wdLineStyleNone
.Borders(wdBorderTop).LineStyle = wdLineStyleNone
.Borders(wdBorderBottom).LineStyle = wdLineStyleNone
.Borders(wdBorderHorizontal).LineStyle = wdLineStyleNone
.Borders(wdBorderVertical).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
End With
Next oTbl
lbl_Exit:
Exit Sub
End Sub
|
|
#3
|
|||
|
|||
|
Thanks alot, Greg!
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Page-crossing borders in a table with hidden between-cell borders
|
tenpaiman | Word | 2 | 08-08-2012 07:20 PM |
Please tell me it doesn't take 7 statements to turn table borders off
|
Jennifer Murphy | Word VBA | 5 | 07-25-2012 03:12 PM |
| Formatting a table with double borders | qwertyas | PowerPoint | 2 | 05-02-2012 05:10 AM |
need to get rid of white outline boxes in table
|
bigredscowboy | Word | 5 | 03-06-2012 05:43 PM |
Word VBA: add borders to active table
|
tinfanide | Word VBA | 2 | 12-02-2011 05:53 AM |