J
jerem
I posted this question yesterday, saw it posted on this site yesterday and
today this question is nowhere to be found. So I'm posing the question once
again.
I scavenged some code from this website (see below), made a couple of
changes here and there, however, cannot figure out how to get the FileName to
come into the footer as Font size 8. Can anyone help? Thanks in advance.
Sub NumberPages2()
'
Dim oRng As Range
Dim oSection As Section
Dim oFooter As HeaderFooter
Call SameAsPrevious
For Each oSection In ActiveDocument.Sections
For Each oFooter In oSection.Footers
If oFooter.Exists Then
Set oRng = oFooter.Range
With oRng
.Fields.Add oRng, wdFieldPage, , False
.InsertBefore "-"
.InsertAfter "-"
.Collapse wdCollapseEnd
.ParagraphFormat.Alignment = _
wdAlignParagraphCenter
.Fields.Add oRng, wdFieldFileName
.InsertAfter Chr(13)
.Collapse wdCollapseEnd
.ParagraphFormat.Alignment = _
wdAlignParagraphLeft
End With
End If
Next oFooter
Next oSection
End Sub
today this question is nowhere to be found. So I'm posing the question once
again.
I scavenged some code from this website (see below), made a couple of
changes here and there, however, cannot figure out how to get the FileName to
come into the footer as Font size 8. Can anyone help? Thanks in advance.
Sub NumberPages2()
'
Dim oRng As Range
Dim oSection As Section
Dim oFooter As HeaderFooter
Call SameAsPrevious
For Each oSection In ActiveDocument.Sections
For Each oFooter In oSection.Footers
If oFooter.Exists Then
Set oRng = oFooter.Range
With oRng
.Fields.Add oRng, wdFieldPage, , False
.InsertBefore "-"
.InsertAfter "-"
.Collapse wdCollapseEnd
.ParagraphFormat.Alignment = _
wdAlignParagraphCenter
.Fields.Add oRng, wdFieldFileName
.InsertAfter Chr(13)
.Collapse wdCollapseEnd
.ParagraphFormat.Alignment = _
wdAlignParagraphLeft
End With
End If
Next oFooter
Next oSection
End Sub