It's a little hard to advise since you haven't posted your code, but this
sort of macro problem usually arises if you try to 'navigate' in your macro
code using the selection object and the sort of navigation you do when
editing footers manually.
Assuming your document ends up with two sections, try something like
Dim pRange As Word.Range
With ActiveDocument.Sections(2).Footers(wdHeaderFooterPrimary)
.LinkToPrevious = False
.Range = ""
.Range.Fields.Add Range:=.Range, Type:=wdFieldFileName
.Range.InsertAfter vbTab & "Page "
Set pRange = .Range
pRange.Collapse Direction:=wdCollapseEnd
.Range.Fields.Add Range:=pRange, Type:=wdFieldPage
[.... etc .... ]
End With
> Thanks Robert for previous assistance the Template I'm working on is nearing
> completion....
[quoted text clipped - 25 lines]
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.718 / Virus Database: 474 - Release Date: 09/07/04
Roger Knowles - 12 Aug 2004 21:25 GMT
Jezabel, Many thanks
Your code did the trick with one minor alteration. I added a variable to
check the section count and then in the Sections(2) I replaced with the
variable+1
you guys are great, thanks
As a trainer sometimes delegates are amazed by my knowledge of Apps...., I
am amazed by your knowledge......
Roger
> It's a little hard to advise since you haven't posted your code, but this
> sort of macro problem usually arises if you try to 'navigate' in your macro
[quoted text clipped - 47 lines]
> > Checked by AVG anti-virus system (http://www.grisoft.com).
> > Version: 6.0.718 / Virus Database: 474 - Release Date: 09/07/04