View Single Post
 
Old 03-02-2011, 05:14 PM
cksm4 cksm4 is offline Windows XP Office 2007
Advanced Beginner
 
Join Date: Aug 2010
Posts: 48
cksm4 is on a distinguished road
Default Header/Footer lost with InsertFile

Hello all,

Using the below code starting in a section where the Header/Footer is linked to the previous section is removing the link and causing the page numbering to delete. Is there a way to modify this code to link to Header and Footer to the previous section after each file is inserted? I cannot figure out how to get '.HeaderFooter.LinkToPrevious' to work. Any ideas?

Code:
 
ChDir ActiveDocument.Path
myName = Dir("03*.doc*")
While myName <> ""
    With Selection
        .InsertFile FileName:=myName, ConfirmConversions:=False
        .InsertBreak Type:=wdSectionBreakNextPage
        .Collapse Direction:=wdCollapseEnd
    End With
    myName = Dir()
Wend
Thanks!
Brock
Reply With Quote