header/footer link to previous

R

raj

I have 3 sections in my document
section 1 with 1 page and only footer(page number
section 2 with 1 page and only footer(page number
section 3 has 5 pages with only footer at page 1 and rest of the pages have odd/even running head

i want to switch off the "link to previous" for section 3 and delete the footers present in section 1 and 2

but my following code is not removing the link and also not removing the footers

please advic

Dim myrange As Rang
Set myrange = ActiveDocument.Rang
myrange.Collapse wdCollapseStar
MsgBox Selection.Information(wdActiveEndSectionNumber
ActiveDocument.Sections(3).Headers(wdHeaderFooterPrimary).LinkToPrevious = Fals
ActiveDocument.Sections(3).Headers(wdHeaderFooterFirstPage).LinkToPrevious = Fals
ActiveDocument.Sections(3).Headers(wdHeaderFooterEvenPages).LinkToPrevious = Fals
ActiveDocument.Sections(1).Headers(wdHeaderFooterEvenPages).Range.Delet
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Delet
ActiveDocument.Sections(1).Headers(wdHeaderFooterFirstPage).Range.Delet
ActiveDocument.Sections(2).Headers(wdHeaderFooterPrimary).Range.Delet
ActiveDocument.Sections(2).Headers(wdHeaderFooterFirstPage).Range.Delet
ActiveDocument.Sections(2).Headers(wdHeaderFooterEvenPages).Range.Delete
 
D

Doug Robbins - Word MVP

You are acting on the Headers rather than the Footers

--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
raj said:
I have 3 sections in my document.
section 1 with 1 page and only footer(page number)
section 2 with 1 page and only footer(page number)
section 3 has 5 pages with only footer at page 1 and rest of the pages have odd/even running heads

i want to switch off the "link to previous" for section 3 and delete the
footers present in section 1 and 2.
 

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