Jump to content

Recommended Posts

Posted

Dear Lovely Edu-Geekers!

My other half's workplace have purchased a pack of standard new documentation and policies, they all need to be re-branded with her workplace's logo etc, the issue is there are about 200 documents that need doing, I've seen that you can find and replace an image in a single word document but does anyone know of a way to do it in bulk? Help would be muchly appreciated otherwise it is several hours work to do it manually! Alternatively is there a way to make a word template and apply it to many docs?? Many Edu-Hobnobs for the answer!

Posted
.docx I would have thought, what is your technique? (I've searched for a while now and nothing seems able to do it!)

 

A quick bit of fiddling around with converting them to zip files, extract the zip and overwrite the image file found in /word/media. But it's actually going to be considerably more complicated than I originally thought as you'll have to test each image in there to check if it's the one (or one of the ones) you want to replace. The easiest way to do that would be to get one of each of the images you'll be replacing and get a hash from that, then compare that hash to the hash you'd generate as you iterate over every image in the folder.

 

In small documents that's quite easy and quick but if you've got either a lot of documents (200 would take a while I'd guess) or the documents are big with a lot of images (or both) then I'd figure it's going to take quite a while. Getting the initial images that you want to replace is likely the harder part as you'd have to be sure you've got all the variations or it's likely to miss a few. The good thing is that Word stores the original image (only once thankfully) and then crops/resizes/whatever on top of that without editing the original file so the hash should always be the same, especially since most businesses have a central store of images they use in all their documents that would ensure the source is always the right file.

  • Thanks 1
Posted
Turns out they are .rtf's that have no image but need one adding to the header, and find and replace for certain phrases, have setup a few macros that bodge it all together, thanks for your help though :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...