I'm trying to insert a image in the first page header of a document, trough VBA.
There are multiple lines that can do this, but each has it problem, which I will list:
This is my favorite method, but it inserts the image not in the header of first page, but all the remaining ones, and it also doesn't allow me to set the position:
ActiveDocument.Sections(1).Headers(2).Shapes.AddPicture ("C:\1.jpg")
This returns an out of bounds error:
Set shpCanvas=ActiveDocument.Shapes.AddCanvas(Left:=0, Top:=0, Width:=180, Height:=50)
shpCanvas.CanvasItems.AddPicture FileName:="C:\1.jpg", LinkToFile:=False, SaveWithDocument:=True
Inserts the image directly, but its usually out of position, stays in the middle of the header where I'd rather have it on the left
ActiveDocument.Sections(1).Headers(wdHeaderFooterFirstPage).Range.InlineShapes.AddPicture ("C:\1.jpg")
I'm just a beginner with VBA and word, I apologize for any grotesque ideas I might have