How can I remove all pictures from a document?

Y

Yoni

I made a document of some 70 pages from a pdf file, and a lot of pictures got
placed in the wrong places. I don't need them, and want to erase them all -
only I didn't find a way to do that. I really don't want to go one by one. Is
there a solution?
 
G

Graham Mayor

Are the images inserted 'in line' or floating? If the former use the replace
function to replace ^g with nothing.
If not, or a mixture of both, then you will need a macro eg (without knowing
what else is in the document) something like:

With ActiveDocument
.Range.Find.Execute findText:="^g", _
Replacewith:="", _
Replace:=wdReplaceAll
For i = .Shapes.Count To 1 Step -1
If .Shapes(i).Type = msoPicture Then
.Shapes(i).Delete
End If
Next i
End With

http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top