![]() |
#1
|
||||
|
||||
![]()
Hi all,
I apolgise if there is a solution already on here, I have not been able to locate it. I have been trying to solve this problem. ![]() I have tables that I need to format. I would like to select a number of columns. I know how to select 1 column and format it. Can any one advise on how I may be able to select for example columns 3, 7 ,9 or any other columns I need to select. I have looked at and tested various code snippets from: https://msdn.microsoft.com/en-us/lib.../ff195142.aspx I still can't work it out. Code:
Sub FormatColumns() ActiveDocument.Tables(1).Columns(6).Select With Selection.Borders(wdBorderLeft) .ColorIndex = wdWhite End With With Selection.Borders(wdBorderRight) .ColorIndex = wdWhite End With With Selection.Borders(wdBorderTop) .ColorIndex = wdWhite End With With Selection.Borders(wdBorderBottom) .ColorIndex = wdWhite End With With Selection.Borders(wdBorderHorizontal) .ColorIndex = wdWhite End With End Sub is this possible: ActiveDocument.Tables(1).Columns(3,6,9).Select Later I would like to use the same logic to select multiple rows. Any advice I would appreciate Thank you in advance for your time ![]() J Last edited by macropod; 09-22-2015 at 10:04 PM. Reason: Added code tags & formating |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
dherr | Word VBA | 3 | 05-02-2023 09:37 AM |
Want a quotient using a constant to show up in column c each time a number is added to column b | fibbermcghee | Excel | 2 | 12-09-2014 05:48 PM |
![]() |
dylansmith | Excel | 9 | 05-16-2014 07:25 PM |
Conditional Formatting: How to dynamically apply to an expanding table? | tinfanide | Excel | 0 | 10-18-2013 06:34 AM |
Apply formatting html version | Kreol2013 | Word VBA | 0 | 08-26-2013 05:08 PM |