S
Sammy
Hello,
I need to have the filename (on every page) and the page number (on every
page except the first) in the footer, in every section of my document. I
scrub all footers first and I can get that to work. So far I have:
Dim i As Integer
For i = 1 To ActiveDocument.Sections.Count
With ActiveDocument.Sections(i)
.Footers(wdHeaderFooterFirstPage).Range.Delete
.Footers(wdHeaderFooterFirstPage).Range.Fields.Add
_Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"FILENAME \* Lower ", PreserveFormatting:=True
.Footers(wdHeaderFooterPrimary).Range.Delete
.Footers(wdHeaderFooterFirstPage).Range.Fields.Add _
Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"FILENAME \* Lower ", PreserveFormatting:=True
Selection.Sections(1).Footers(1).PageNumbers.Add PageNumberAlignment:= _
wdAlignPageNumberCenter, FirstPage:=False
End With
Next i
IF YOU THINK THIS DOESN'T WORK YOU ARE CORRECT. IN HELP, THEY ALWAYS GIVE
EXAMPLES USING ONLY A CERTAIN MEMBER OF A COLLECTION SO I COULDN'T FIGURE OUT
HOW TO PUT PAGE NUMBERING IN ALL SECTIONS.
CAN YOU HELP? THANKS A LOT
I need to have the filename (on every page) and the page number (on every
page except the first) in the footer, in every section of my document. I
scrub all footers first and I can get that to work. So far I have:
Dim i As Integer
For i = 1 To ActiveDocument.Sections.Count
With ActiveDocument.Sections(i)
.Footers(wdHeaderFooterFirstPage).Range.Delete
.Footers(wdHeaderFooterFirstPage).Range.Fields.Add
_Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"FILENAME \* Lower ", PreserveFormatting:=True
.Footers(wdHeaderFooterPrimary).Range.Delete
.Footers(wdHeaderFooterFirstPage).Range.Fields.Add _
Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"FILENAME \* Lower ", PreserveFormatting:=True
Selection.Sections(1).Footers(1).PageNumbers.Add PageNumberAlignment:= _
wdAlignPageNumberCenter, FirstPage:=False
End With
Next i
IF YOU THINK THIS DOESN'T WORK YOU ARE CORRECT. IN HELP, THEY ALWAYS GIVE
EXAMPLES USING ONLY A CERTAIN MEMBER OF A COLLECTION SO I COULDN'T FIGURE OUT
HOW TO PUT PAGE NUMBERING IN ALL SECTIONS.
CAN YOU HELP? THANKS A LOT