View Single Post
 
Old 05-06-2012, 10:29 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,359
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

You could use code like:
Code:
Sub Demo()
Dim Scn As Section, HdFt As HeaderFooter
With ActiveDocument
  Set Scn = .Sections.Add(Range:=.Range.Characters.Last, Start:=wdSectionNewPage)
  With Scn
      For Each HdFt In Scn.Headers
      HdFt.LinkToPrevious = False
      .Range.Text = vbNullString
    Next
    For Each HdFt In Scn.Footers
      HdFt.LinkToPrevious = False
      .Range.Text = vbNullString
    Next
    .Range.InsertFile FileName:="Filepath & name"
    While .Range.Characters.Last.Previous = vbCr
      .Range.Characters.Last.Previous.Delete
    Wend
  End With
End With
End Sub
Of course, you'll need to change 'Filepath & name' to match your requirements.

PS: Please post macro-related Word questions in the Word VBA forum.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote