VBA Word Insert Image Header

VBA to insert a header image into Word document.  Change filepath to your image.

*Note if  you get error:  The remote server machine does not exist or is unavailable.  That just means Word connection could not be established.  Exit out of Word and try again.  Should work if Word is closed.

Enable Microsoft Word 16.0 Object Library
Sub insertHeaderImage()
Dim wrdDoc As Word.Document
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Add

With wrdDoc

' Set header of doc

Dim BoldRange As Range
Dim HdrRange As Range

Set docActive = Word.ActiveDocument
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.InlineShapes.AddPicture "C:\Users\dgreg\Desktop\header.PNG"

End With

End Sub