You don't need the loop
Code:
Function ChangeLogo(oDoc As Document) As Boolean
Dim oSection As Section
Dim oHeader As HeaderFooter
Dim oShape As Shape
Const strImage As String = "D:\My Documents\My Pictures\GMLogo.png" '"C:\lh.png"
On Error GoTo Err_Handler
Set oSection = oDoc.Sections.First
' set first section header type - may conflict with other format desires...
oSection.PageSetup.DifferentFirstPageHeaderFooter = True
' put logo on first page header
Set oHeader = oSection.Headers(wdHeaderFooterFirstPage)
Set oShape = oHeader.Shapes.AddPicture(FileName:=strImage)
With oShape
.RelativeHorizontalPosition = wdRelativeHorizontalPositionColumn
.RelativeVerticalPosition = wdRelativeVerticalPositionParagraph
.Left = CentimetersToPoints(-1)
.Top = CentimetersToPoints(-0.07)
End With
ChangeLogo = True
lbl_Exit:
Set oSection = Nothing
Set oHeader = Nothing
Set oShape = Nothing
Exit Function
Err_Handler:
ChangeLogo = False
Resume lbl_Exit
End Function