View Single Post
 
Old 06-16-2014, 04:16 PM
Irrma Irrma is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Jun 2014
Posts: 2
Irrma is on a distinguished road
Default What's wrong with my loop?

Hi,

I am getting multiple footers in sections. Does anybody know what I am going wrong?

Sub AddFooter()
'
' AddFooter Macro
'
'
Dim i As Integer
ActiveDocument.PageSetup.OddAndEvenPagesHeaderFoot er = True
For i = 1 To ActiveDocument.Sections.Count

ActiveDocument.Sections(i).Footers(wdHeaderFooterP rimary).Range _
.InsertAfter "Odd Header"
ActiveDocument.Sections(i).Footers(wdHeaderFooterE venPages).Range _
.InsertAfter "Even Header"


Next i

End Sub

Please help.Thank you!!!
Reply With Quote