The following code extract successfully writes a new footer to a Word document:
For Each oFooter In oSec.Footers
If oFooter.Exists Then
Set rngFooter = oFooter.Range
With rngFooter
With .ParagraphFormat.TabStops
.ClearAll
.Add CentimetersToPoints(posAlignTabCentre), wdAlignTabCenter
.Add CentimetersToPoints(posAlignTabRight), wdAlignTabRight
End With
.Font.Name = "Arial"
.Font.Size = "10"
.Font.Color = wdColorDarkBlue
.Text = strTitle & vbTab & strVersion & vbTab & "Page "
.Collapse wdCollapseEnd
.Fields.Add rngFooter, wdFieldPage, , False
.Start = oFooter.Range.End
.Text = " of "
.Collapse wdCollapseEnd
.Fields.Add rngFooter, wdFieldNumPages, , False
.Start = oFooter.Range.End
.Text = vbCr & vbCr & strCopyright & vbTab & vbTab & strClassification
.Borders.Enable = True
End With
End If
Next oFooter
The footer is presented as shown below. Each row in the 'table' has a border.
----------------------------------------------------------------------------------------
| strTitle strVersion Page x of y |
----------------------------------------------------------------------------------------
| |
----------------------------------------------------------------------------------------
| strCopyright strClassification |
----------------------------------------------------------------------------------------
I wish to change this to show the border around the 3 'cells' in the first row only.
I have attempted to illustrate this below
----------------------------------------------------------------------------------------
| strTitle | strVersion | Page x of y |
----------------------------------------------------------------------------------------
strCopyright strClassification
I need to change .Borders.Enable = True
How can I achieve this?