No, not without either some assumptions about the document or some
preparation at the time the logo is inserted.
If you can safely assume that (a) the logos are all InlineShape objects (or,
alternatively, all floating Shape objects) and (b) the logos are the _only_
InlineShape (or Shape) objects in the document and (c) the logos are in the
body of the document rather than in the header or footer or some other
story, then run the code
Dim nILS As Long
With ActiveDocument.InlineShapes
For nILS = .Count To 1 Step -1
.Item(nILS).Delete
Next
End With
(substitute .Shapes for .InlineShapes if appropriate). If the logos are
inserted in the headers of multiple sections instead of the body of the
document, and are the only graphics in the header, something like this would
be appropriate, with tweaking as necessary:
Dim nILS As Long
With ActiveDocument.Sections(1).Headers( _
wdHeaderFooterPrimary).Shapes
For nILS = .Count To 1 Step -1
.Item(nILS).Delete
Next
End With
If there are, or might be, other graphics in the document, then you need
more planning ahead. When you insert any logo, surround it with a bookmark
with a specific recognizable string in its name. For example, assuming the
logo is inserted as an InlineShape, you could do this:
Dim FPRange As Range
Dim ATnm As String
ATnm = "Logo1" ' each logo assumed to be named "LogoNN"
Set FPRange = Selection.Range ' or set some other range
With ActiveDocument
.AttachedTemplate.AutoTextEntries(ATnm).Insert _
Where:=FPRange, RichText:=True
.Bookmarks.Add Name:=ATnm, Range:=FPRange
End With
The bookmark would thus surround the logo. To delete the logos, use code
like this:
Dim BKnum As Long
With ActiveDocument.Bookmarks
For BKnum = .Count To 1 Step -1
If InStr(.Item(BKnum).Name, "Logo") Then
.Item(BKnum).Range.Delete
End If
Next
End With
--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.