Hi Paul,
Thanks. How can we reference a heading without a bookmark?
With regards to the the code I am talking about (for the page break) see the code below (which was provided by you). I was wondering if we can delete the existing footer of newly inserted document and link it to the previous footer?
Code:
Sub insertdoc_essential()
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:="p:\psk service agreements\client ongoing service agreement - Essentials.docx"
While .Range.Characters.Last.Previous = vbCr
.Range.Characters.Last.Previous.Delete
Wend
End With
End With
End Sub