View Single Post
 
Old 09-19-2021, 02:19 AM
beginner beginner is offline Windows 7 32bit Office 2013
Advanced Beginner
 
Join Date: Sep 2011
Location: Europe
Posts: 45
beginner will become famous soon enough
Default Replace all Images with ordinal numbers in multiple files

In the "C:\Temp" folder I have about 500 files (*.docx)

I'm looking for a VBA command that will do the following:

1. Open the first file and find the first Image in the document. Replace it with the text "IMAGE 1".
2. Find another Image in the same document and replace it with the text "IMAGE 2",
3. Find the third Image in the same document and replace it with the text "IMAGE 3",
4. etc ...
5. When there are no more Images, save and close the file (Word document)

- Open the next Word file (second file) and do the same as for the first

- Open the next Word file (third file) and do the same as before.

- and so on to the end (to the last file)


Basically, I want to replace all Images with "text" but by assigning an ordinal number to each subsequent Image (in one document).
I want to do all this in one step (at once).

Is there anyone VBA who can do this?
Reply With Quote