View Single Post
 
Old 03-04-2011, 08:44 PM
macropod's Avatar
macropod macropod is online now Windows 7 32bit Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,338
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Brock,

Using your code, I am only able to replicate the problem you describe if source document has its Section breaks. In such cases, you might choose to delete those Section breaks or change their formatting to 'same as previous'. As an example of the latter:
Code:
Sub Demo()
Dim myName As String, RngTmp As Range, Sctn As Section, HdFt As HeaderFooter
ChDir ActiveDocument.Path
myName = Dir("03*.doc*")
While myName <> ""
  With Selection
    Set RngTmp = .Range
    With RngTmp
      .Start = .Start - 1
      .End = .End + 1
    End With
    .InsertBreak Type:=wdSectionBreakNextPage
    .InsertFile FileName:="myName", ConfirmConversions:=False
    .InsertBreak Type:=wdSectionBreakNextPage
    With RngTmp
      For Each Sctn In .Sections
        With Sctn
          For Each HdFt In .Headers
            HdFt.LinkToPrevious = True
          Next HdFt
          For Each HdFt In .Footers
            HdFt.LinkToPrevious = True
          Next HdFt
        End With
      Next Sctn
    End With
  End With
  myName = Dir()
Wend
Set RngTmp = Nothing
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote