JJ said:
How can I search in VBA for images in word docs, headers and footers
which are not inline images? I have tried searching for ^g and it
doesn't find the one's which are not "in line". Any suggestions?
You haven't said what you want to do with them once you find them, so it's
hard to be specific. In general, you'd run a loop like this:
Dim oShp As Shape
For Each oShp in ActiveDocument.Shapes
' do something -- select, format, delete, etc.
Next oShp
Inside that loop, you can examine the value of oShp.Type to find out whether
it's an autoshape, a textbox, or something else, so you can be more exact
about which shapes you "do something" with.
If the document contains both floating and in-line shapes, you'll have to
handle them in separate loops because they're in separate collections.
Dim oILShp As InlineShape
For Each oILShp in ActiveDocument.InlineShapes
' do something -- select, format, delete, etc.
Next oILShp
The two types of shape objects have different properties and methods, so
what you can do with them differs.