LinkToPrevious = True is not working for only First Page Header andFooter

R

ravi

I am working on a conversion from Word 2003 to Word 2007 and I have
run into a weird problem.

If ResultDoc.Sections.Count = 2 Then

ResultDoc.Sections(2).Headers(wdHeaderFooterPrimary).LinkToPrevious =
True

ResultDoc.Sections(2).Footers(wdHeaderFooterPrimary).LinkToPrevious =
True

ResultDoc.Sections(2).Headers(wdHeaderFooterEvenPages).LinkToPrevious
= True

ResultDoc.Sections(2).Footers(wdHeaderFooterEvenPages).LinkToPrevious
= True
'Below statements are throwing "This command is not
available" (4605) Error

ResultDoc.Sections(2).Headers(wdHeaderFooterFirstPage).LinkToPrevious
= True

ResultDoc.Sections(2).Footers(wdHeaderFooterFirstPage).LinkToPrevious
= True
End If

As you can see only Firstpage (Header / Footer) has the problem while
the other LinkToPrevious setting changes works.
Any idea where the problem can be?

- Ravi
 
D

Doug Robbins - Word MVP

I cannot replicat the probem using

With ActiveDocument
If .Sections.Count = 2 Then
With .Sections(2)
.Headers(wdHeaderFooterPrimary).LinkToPrevious = True
.Footers(wdHeaderFooterPrimary).LinkToPrevious = True
.Headers(wdHeaderFooterEvenPages).LinkToPrevious = True
.Footers(wdHeaderFooterEvenPages).LinkToPrevious = True
.Headers(wdHeaderFooterFirstPage).LinkToPrevious = True
.Footers(wdHeaderFooterFirstPage).LinkToPrevious = True
End With
End If
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top