0

How to change all the same pictures in microsoft word to the another picture for all of them in one operation, while all other pictures (they also might be similar to each other or not) must remain their original picture. This can be a word's macro or integration with other programs. Please help me.

I looked on the Internet, includePicture field is something like a code method. I don't understand it. But I solved my problem. The fact is that all the pictures below were signed with different names. First I deleted all the pictures. I just used the 'replace all' function to replace all the same words with the desired picture. I just had to think about how to leave the same word at the bottom of the picture. Again, the 'replace all' function helped. First, I replaced all the same words with two identical words, one under the other, but with different registers in some letters, so that when replacing a word with a picture, it is the word at the top that is replaced, and what is at the bottom, since it is written with a different register, remains and is not replaced. Then I replaced all the words with the wrong case back to the correct one

  • Not possible, without very complex VBA. – spikey_richie Jul 31 '23 at 13:37
  • 1
    Are the pictures inline or on disk? If you don't know, press Alt+F9 and see if they now show up as INCLUDEPICTURE fields. – harrymc Jul 31 '23 at 15:07
  • When i press Alt+F9 in Mword - nothig is happening. It's copied from social web chat conversation with avatars. I want to change either of two repeating avas to another two avas. Anyway, Thx for Your help) – Dzharik Olivie Jul 31 '23 at 18:34
  • Word will not be able to tell identical pictures. They need to be marked for Word in some way. If I were setting something up for this, I would be using an IncludePicture field and simply replacing the old picture with the new one, saving the same name and location. – Charles Kenyon Aug 01 '23 at 03:15

1 Answers1

0

NB: Do this on a copy of the file

1- Change the extension of the file from .DOCX to .ZIP, then unzip the file, you should see a directory called word in which there is a subdirectory called media which contains all the embedded images.

2- Find the image you want to replace and note the name down (it will be something like "image1.jpg", so if there's a lot of images, this may take time).

3- Rename the image you want to replace it with to match the name, file format (JPEG, PNG, etc...), and pixel dimensions.

4- Copy the new image file over the old image file in the media directory.

5- Zip the directory and change the extension back to DOCX

cybernetic.nomad
  • 5,415
  • 12
  • 25
  • I think this algo will take the same time as if i'd do replace each image in word by hand, or i'm mistaken? – Dzharik Olivie Aug 01 '23 at 20:51
  • I can't tell you, you need to try it. That all depends on how many different images there are in your doc and how many instances you need to replace. one advantage of this method is that you are certain not to skip an occurence of the image to be replaced – cybernetic.nomad Aug 01 '23 at 20:57