Footer Macro in Word - Section Count

A

Alicia Napier

I'm trying to create a macro that can copy the information in the Footer on the first page (section one) to the rest of the footers in the remainnig sections. The macro needs to know how to count the sections and use that number to 'repeat' the copy/paste function. Does that make sense? Can anyone help?

Thanks!
 
F

fumei via OfficeKB.com

Just make them "Same as previous"

Alicia said:
I'm trying to create a macro that can copy the information in the Footer on the first page (section one) to the rest of the footers in the remainnig sections. The macro needs to know how to count the sections and use that number to 'repeat' the copy/paste function. Does that make sense? Can anyone help?

Thanks!
 
D

Doug Robbins - Word MVP

You do not need to copy and paste. Linking the Footers to the Footer in the
previous section will do the same thing. The following code should do that:

With ActiveDocument
For i = 2 To .Sections.Count
.Sections(i).Footers(wdHeaderFooterFirstPage).LinkToPrevious = True
.Sections(i).Footers(wdHeaderFooterPrimary).LinkToPrevious = True
Next i
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