How can I remove all pictures from a document?

  • Thread starter Thread starter Yoni
  • Start date Start date
Y

Yoni

I need to remove a few hundred pictures from a document and really don't wish
to do that one by one. Anyone has a solution?
 
See the answer I posted yesterday! Which in case the NNTP/Web link has
screwed up again was

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

My web site www.gmayor.com

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

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

Back
Top