I need to determine if a picture object or logo is stored in a header.
I have the following code.
Set rangeHeader = ActiveDocument.Sections(x).Headers(wdHeaderFooterFirstPage).Range
rangeHeader.Select
If (Selection.Type = wdInlineShapeEmbeddedOLEObject) Or (Selection.Type = wdInlineShapeLinkedOLEObject) Or (Selection.Type = wdInlineShapeLinkedPicture) Or (Selection.Type = wdInlineShapeOLEControlObject) Or (Selection.Type = wdInlineShapePicture) Then
MsgBox (“Pic found”)
‘perform other code
The problem I’m having with the above code is when I test on a current document that has a logo returns true.
However when I testing on a doc that doesnt have logo in header still returns TRUE.
Does anyone know/have code to obtain the correct information.
Thanks in advance!
Diana