Thanks Paul,
Rather than working with Words inbuilt templates, I was looking at a template stored locally in a shared drive.
I made a rookie VBA error here in assuming what I needed and asking for assistance when actually I didn't need a loop in this instance, but a better understanding of the header/footer properties as I have now got this to working by repeating elements of the code to pull the wdHeaderFooterPrimary from the template:
Set doc = ActiveDocument
strTemplate = fPath & "Letterhead.docx" 'fPath declared as a public constant
Set docTemplate = Documents.Open(strTemplate, AddToRecentFiles:=False, ReadOnly:=True, Visible:=False)
Set hdr1 = docTemplate.Sections(1).Headers(wdHeaderFooterFirstPage) 'Copies the first page header
Set hdr2 = doc.Sections(1).Headers(wdHeaderFooterFirstPage)
hdr1.Range.Copy
hdr2.Range.Paste
Set hdr1 = docTemplate.Sections(1).Headers(wdHeaderFooterPrimary) 'Copies the diffrent first page header
Set hdr2 = doc.Sections(1).Headers(wdHeaderFooterPrimary)
hdr1.Range.Copy
hdr2.Range.Paste
Set hdr1 = docTemplate.Sections(1).Footers(wdHeaderFooterFirstPage) 'Copies the footer
Set hdr2 = doc.Sections(1).Footers(wdHeaderFooterPrimary)
hdr1.Range.Copy
hdr2.Range.Paste
docTemplate.Close False
Full code here I case anybody finds it useful:
Sub CopyLetterhead()
'***************************************************************************************
'Purpose: Copies the current document on to Company letterhead
'***************************************************************************************
Dim docTemplate As Document
Dim strTemplate As String
Dim hdr1 As HeaderFooter
Dim hdr2 As HeaderFooter
Dim doc As Document
Dim Answer As Integer
Dim sec As Section
Answer = MsgBox("This will copy the current content ofthis document onto Company letterhead." & _
vbCr &vbCr & "Would you like to continue?", vbYesNo + vbQuestion,"Copy to Letterhead")
If Answer = vbNo Then
Exit Sub
End If
Application.ScreenUpdating = False
'Set page setup sizes for page and margins
With ActiveDocument.PageSetup
.DifferentFirstPageHeaderFooter= True
.TopMargin =CentimetersToPoints(5.84)
.BottomMargin =CentimetersToPoints(3)
.LeftMargin =CentimetersToPoints(2.54)
.RightMargin =CentimetersToPoints(2.54)
.Gutter =CentimetersToPoints(0)
.HeaderDistance =CentimetersToPoints(3.81)
.FooterDistance =CentimetersToPoints(0.63)
.PageWidth =CentimetersToPoints(21)
.PageHeight =CentimetersToPoints(29.7)
End With
'Copy header and footer from the template doc
Set doc = ActiveDocument
strTemplate = “C:\Desktop\Letterhead.docx"
Set docTemplate = Documents.Open(strTemplate,AddToRecentFiles:=False, ReadOnly:=True, Visible:=False)
Set hdr1 =docTemplate.Sections(1).Headers(wdHeaderFooterFirstPage) 'Copies the first pageheader
Set hdr2 = doc.Sections(1).Headers(wdHeaderFooterFirstPage)
hdr1.Range.Copy
hdr2.Range.Paste
Set hdr1 =docTemplate.Sections(1).Headers(wdHeaderFooterPrimary) 'Copies the diffrentfirst page header
Set hdr2 = doc.Sections(1).Headers(wdHeaderFooterPrimary)
hdr1.Range.Copy
hdr2.Range.Paste
Set hdr1 =docTemplate.Sections(1).Footers(wdHeaderFooterFirstPage) 'Copies the footer
Set hdr2 = doc.Sections(1).Footers(wdHeaderFooterPrimary)
hdr1.Range.Copy
hdr2.Range.Paste
docTemplate.Close False
On Error Resume Next
For Each s In ActiveDocument.Sections
sec.Headers(wdHeaderFooterEvenPages).LinkToPrevious = True
sec.Headers(wdHeaderFooterFirstPage).LinkToPrevious = True
sec.Headers(wdHeaderFooterPrimary).LinkToPrevious = True
sec.Footers(wdHeaderFooterEvenPages).LinkToPrevious = True
sec.Footers(wdHeaderFooterFirstPage).LinkToPrevious = True
sec.Footers(wdHeaderFooterPrimary).LinkToPrevious = True
Next sec
On Error GoTo 0
Call ClearClipboard
Application.ScreenUpdating = True