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
I am pretty sure that I'm misunderstanding the syntax somewhere.
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