I
Ian B
With assistance from Graham & Gerry I now have the correct fonts in my
footers.
Next (and last) problem is to append the page number to a string being
inserted in the footer, the page number to be preferably to be formatted as
"01","02" .."99". Will never be more than 99 pages in a section.
One way which almost meets the requirement is to append a PageNum field to
the string, but as I am manipulating the footer using the code below, I do
not know how this can be done.
Again any help much appreciated. Portion of Code below.
~~~~~~~~~
sStamp = GetHex(lS)
With ActiveDocument.Sections(lS)
.Footers(wdHeaderFooterPrimary).LinkToPrevious = False
For Each oHeader In .Footers
Set oRng = oHeader.Range
With oRng
If Len(oRng) > 1 Then
.InsertAfter vbCr
End If
.Paragraphs.TabStops.ClearAll
.ParagraphFormat.TabStops.Add Position:=CentimetersToPoints(17),
Alignment:=wdAlignTabRight, Leader:=wdTabLeaderSpaces
If sCode = "B" Or sCode = "F" Then
.ParagraphFormat.TabStops.Add
Position:=CentimetersToPoints(8.5), Alignment:=wdAlignTabLeft,
Leader:=wdTabLeaderSpaces
End If
.Start = oHeader.Range.End
.Text = sStamp <<<<< PageNumber to be
added here
.End = oHeader.Range.End
.Font.Name = "Arial"
.Font.Size = 16
.Start = oHeader.Range.End
~~~~~~~~
footers.
Next (and last) problem is to append the page number to a string being
inserted in the footer, the page number to be preferably to be formatted as
"01","02" .."99". Will never be more than 99 pages in a section.
One way which almost meets the requirement is to append a PageNum field to
the string, but as I am manipulating the footer using the code below, I do
not know how this can be done.
Again any help much appreciated. Portion of Code below.
~~~~~~~~~
sStamp = GetHex(lS)
With ActiveDocument.Sections(lS)
.Footers(wdHeaderFooterPrimary).LinkToPrevious = False
For Each oHeader In .Footers
Set oRng = oHeader.Range
With oRng
If Len(oRng) > 1 Then
.InsertAfter vbCr
End If
.Paragraphs.TabStops.ClearAll
.ParagraphFormat.TabStops.Add Position:=CentimetersToPoints(17),
Alignment:=wdAlignTabRight, Leader:=wdTabLeaderSpaces
If sCode = "B" Or sCode = "F" Then
.ParagraphFormat.TabStops.Add
Position:=CentimetersToPoints(8.5), Alignment:=wdAlignTabLeft,
Leader:=wdTabLeaderSpaces
End If
.Start = oHeader.Range.End
.Text = sStamp <<<<< PageNumber to be
added here
.End = oHeader.Range.End
.Font.Name = "Arial"
.Font.Size = 16
.Start = oHeader.Range.End
~~~~~~~~