Can't seem to delete all images from a Word Doc

Joined
Jul 13, 2022
Messages
6
Reaction score
0
I have a very long (9000 page) .rtf Word document. It was created via OCR from 9000 pages of hardcopy.

Occasionally the text includes images (as per the attached image).

I realise there is the option of replacing all graphics with nothing, and that should delete all the images.

(As in find ^g replace [leave blank]).

Nonetheless when I do this it says there were zero replacements made.

This is driving me crazy, as clearly there are graphics inside the document.

Could the images I see be something other than graphics? How can I delete them all?
 
Joined
Aug 6, 2023
Messages
3
Reaction score
0
This can be done with a VB macro:

Code:
Sub MyMacro()
Dim imgS As InlineShape
For Each imgS In ActiveDocument.InlineShapes
    ActiveDocument.Range(imgS.Range.Start, imgS.Range.End).Text = ""
Next
End Sub

To use the above code you will need to enable the developer tab and open Visual Basic - see How to open the Visual Basic editor in Word.
 
Last edited:
Joined
Aug 6, 2023
Messages
3
Reaction score
0
Just thought of another possible solution!

If you didn't need to keep the formatting, you could save the document as a plain text document, this would remove all the images.
 

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