In this tutorial, I will guide to you 2 ways to delete all photos in word document. We will delete all pictures by find and replace tool; VBA code.
Surely we are familiar with the operations of adding, removing, editing, and deleting when working with Word. But in case when you copy a web page, you accidentally paste it into Word browser both the content and advertising images of that website. In simple terms, you just want to keep the content and remove all the images. Deleting photos is very simple, you can click on each photo and delete them one by one. But I revealed to you that there is a way for you to delete all the pictures in a Word document at once. Let’s find out for more details.
May you like: How to get pictures from word document?
I. Delete all photos in word document by using Replace tool.
1: Open the file contains photos to batch delete.
2: Select tab Home, then look to the right at the Editing section, choose Replace.
3: Find and Replace dialog box appears. At this point click on More > >
Look down at the Special button, click to find Graphic. Click on Graphic to choose. At this part Word will automatically find all graphics contained in the document.
4: After that, choose Replace all to automatically delete all photos in batch.
A dialog box will appear saying the replacements have been complete. Press OK to exit.
And this is the result with no photos in it.
II. Using VBA code.
This method is less popular and requires more knowledge in computer science but it’s okay, the implementation is very simple.
Step 1: First you also open Word file contains photos. Then press Alt + F11 to open Microsoft Visual Basic for Application box.
Step 2: In the main tab, click Insert then choose Module.
Step 3: A blank dialog box will appear. Now all you have to do is copy this code below and paste into the box.
Dim objPic As InlineShape
For Each objPic In ActiveDocument.InlineShapes
Step 4: Then press this little green triangle shape or F5 to start deleting photos.
One second is all it takes and you can go back to Word to see the results. All photos have been deleted.
That’s it, deleting photos in batch with these simple and easy steps will definitely help you a lot. In my opinion, it is necessary to know this because if you have to work a lot with Word, editing is probably inevitable and requires frequent manipulation. Hope that after this article, you will have some more experiences when working on Word.
Stay tuned for the next interesting articles. Thanks and good luck.
Peter Cholakis says
mechanicaleng blog says
what is your problem?