You have a Word document filled with dozens of images that need to be swapped out for updated versions. Manually deleting each old picture and inserting its replacement is tedious and error-prone, especially in long reports or proposals. Word does not offer a single Replace All button for images like it does for text, but you can achieve the same result using a combination of the Find and Replace dialog with the Clipboard and a simple macro. This article explains how to replace all images in Word with new versions using a VBA macro, the manual Clipboard method, and the limitations of each approach.
Key Takeaways: Replacing All Images in Word
- VBA macro method (Alt + F11 > Insert > Module): Runs a script that deletes every inline image and pastes the new image from the Clipboard into the same positions.
- Manual Clipboard method: Copies the new image and uses Find and Replace with the Clipboard contents to swap out old images one by one.
- No built-in Replace All for images: Word only replaces text, not graphics, in the standard Find and Replace dialog; macros are the only way to automate image replacement.
How Word Handles Images in Find and Replace
Word’s Find and Replace feature is designed for text, not graphical objects. When you open the Find and Replace dialog (Ctrl + H), the options for searching graphics are limited. You can search for images by using the Special menu and selecting Graphic, but this only finds the first image in the document. There is no Replace All button that lets you swap every instance of an old image with a new one.
The reason for this limitation is that images are not stored as simple characters. Each picture is an embedded object with properties such as size, wrapping style, and position. Word cannot map the contents of one image to another automatically. To replace all images, you need to either use a macro that iterates through every image in the document or use the Clipboard method, which replaces images one at a time.
Before starting, prepare the new image file you want to insert. Save it in a common format such as PNG, JPG, or GIF. If you are using the macro method, you must have the new image copied to the Clipboard before running the script. If you are using the manual method, copy the new image to the Clipboard as well.
Method 1: Replace All Images Using a VBA Macro
This method uses a Visual Basic for Applications macro that deletes every inline image in the document and pastes the new image from the Clipboard into the same location. It works for images that are inserted inline with text. Floating images with custom text wrapping may not be replaced correctly.
- Copy the new image to the Clipboard
Open the new image file in any program, select the entire image, and press Ctrl + C. Keep the image on the Clipboard until the macro finishes. - Open the VBA editor
In Word, press Alt + F11 to open the Visual Basic for Applications editor. - Insert a new module
In the editor, click Insert on the menu bar and select Module. A blank code window appears. - Paste the macro code
Copy the following code and paste it into the module window:Sub ReplaceAllInlineImages()
Dim shp As InlineShape
For Each shp In ActiveDocument.InlineShapes
If shp.Type = wdInlineShapePicture Then
shp.Select
Selection.Delete
Selection.Paste
End If
Next shp
End Sub - Run the macro
Press F5 while the cursor is inside the macro code, or click the green Run arrow in the toolbar. The macro scans every inline shape in the document. When it finds an inline picture, it deletes it and pastes the new image from the Clipboard in its place. - Save the document
After the macro finishes, save the document to keep the changes. The old images are gone, and the new image appears in every location where an inline picture used to be.
Important: This macro replaces every inline picture with the same new image. If you need different images in different locations, you must run the macro multiple times with different images on the Clipboard.
Method 2: Replace Images One at a Time Using Find and Replace With Clipboard
If you prefer not to use macros, you can replace images manually using the Find and Replace dialog. This method replaces one image at a time, but it is faster than deleting and inserting each image by hand.
- Copy the new image to the Clipboard
Open the new image file, select it, and press Ctrl + C. - Open Find and Replace
Press Ctrl + H to open the Find and Replace dialog. - Clear the Find what field
Delete any text in the Find what box. - Insert the Find Graphic special code
Click More to expand the dialog. Click Special and select Graphic. The Find what box now contains^g. - Set the Replace with field to Clipboard contents
Click in the Replace with box. Click Special and select Clipboard contents. The Replace with box now contains^c. - Replace images one at a time
Click Find Next to locate the first image. Click Replace to swap it with the new image. Repeat for each image in the document. There is no Replace All button for this method; you must confirm each replacement.
This method works for both inline and floating images, but it replaces every image with the same new image. To use different images, repeat the process after copying a different image to the Clipboard.
Limitations and Things to Avoid When Replacing Images
The macro does not replace floating images
The macro in Method 1 only processes InlineShapes. Floating images are stored in the Shapes collection. To replace floating images, you must modify the macro to iterate through ActiveDocument.Shapes instead of InlineShapes. Be aware that floating shapes may change position after replacement.
Image size and aspect ratio are not preserved
When you paste a new image over an old one, the new image inherits the default paste size, not the size of the original image. If the new image has different dimensions, it may appear larger or smaller than expected. To maintain consistent sizing, resize the new image to match the old one before copying it to the Clipboard.
Word may paste the image as a linked object
If the Clipboard contains a linked image from another application, Word may insert it as a linked object rather than an embedded picture. This can cause broken links if the source file is moved. To avoid this, open the image in an image editor, copy it, and use Paste Special in Word to embed it as a static picture.
Macro Method vs Manual Clipboard Method: Speed and Control
| Item | VBA Macro Method | Manual Clipboard Method |
|---|---|---|
| Speed | Instant for all images | One image at a time |
| Image types replaced | Inline pictures only | Inline and floating images |
| Requires programming knowledge | Yes, basic VBA | No |
| Can use different images per location | No, same image for all | Yes, by copying different images |
| Preserves original image size | No | No |
You can now replace all images in a Word document using a VBA macro or the manual Clipboard method. For large documents with many inline pictures, the macro saves significant time. For documents with mixed inline and floating images, the manual method gives you control over each replacement. Before running either method, test on a copy of the document to verify the results. An advanced tip is to record a macro of the manual Clipboard method and then edit the generated code to loop through all images, giving you a custom solution that handles both inline and floating shapes.