#1
|
|||
|
|||
Formatting only visible borders
Greetings to all the seniors, I am facing a problem and looking forward to a solution.
I have a macro to format tables in word Sub formattingtables() Dim doc as documents Dim t as tables Dim tt as integer Dim I as integer Set doc = Application.Activedocument Set t = Activedocument.range.tables tt = t.count For i = 1 to tt ' If doc.tables(i) is in odd pages then With doc.Tables(i) With doc.Tables(i).Borders(wdBorderLeft) .LineWidth = wdLineWidth150pt .Color = -587137089 End With With doc.Tables(i).Borders(wdBorderRight) .LineWidth = wdLineWidth150pt .Color = -587137089 End With With doc.Tables(i).Borders(wdBorderTop) .LineWidth = wdLineWidth150pt .Color = -587137089 End With With doc.Tables(i).Borders(wdBorderBottom) .LineWidth = wdLineWidth150pt .Color = -587137089 End With With doc.Tables(i).Borders(wdBorderHorizontal) .LineStyle = wdLineStyleSingle .LineWidth = wdLineWidth050pt .Color = -587137089 End With With doc.Tables(i).Borders(wdBorderVertical) .LineStyle = wdLineStyleSingle .LineWidth = wdLineWidth050pt .Color = -587137089 End With With Options .DefaultBorderLineStyle = wdLineStyleSingle .DefaultBorderLineWidth = wdLineWidth150pt End With End With Next End Sub It set the borders to all the borders whether it is visible or not. And that is the problem I am trying to solve. How can I format only those borders which are visible and leave the invisible borders untouched. Looking forward for help. Thanks in advance!! |
Tags |
formatting tables, visible borders |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Syleref not visible | m.rajabzade@gmail.com | Word | 5 | 03-14-2019 05:34 AM |
styleref not visible | m.rajabzade@gmail.com | Word | 1 | 03-14-2019 01:07 AM |
Page-crossing borders in a table with hidden between-cell borders | tenpaiman | Word | 2 | 08-08-2012 07:20 PM |
Formatting a table with double borders | qwertyas | PowerPoint | 2 | 05-02-2012 05:10 AM |
No Header Gap visible? | dr_mik | Word | 0 | 11-25-2009 06:10 PM |