How to automate 'paste as JPEG' for pasting pics in Word so as to reduce the entire document size?

Solution 1:

Have you tried the Compress pictures option under Picture tools - Format? In the dialog you can choose from different copression amounts, and there is a checkbox Apply only to this picture. Unchecking this, all of the images in your document will be compressed.
For images and more see this article ("Compress Pictures", almost on the bottom).

Solution 2:

So... here is another, a little bit hacky solution:

  1. Save your documents in docx format (if you have them in this, go to step 2);
  2. Change the extension of the document to zip (you can leave docx before, like yourdocumentname.docx.zip); if you want, you can create a backup of your original document before doing anything;
  3. Extract the contents of the zip file to a folder (lets name it tmp) with WinRAR or anything else;
  4. In folder where you extracted the zip, look up a folder, named word;
  5. In the word folder, there is a media folder, there are the images of the document stored;
  6. Do the batch conversion for each png images with your tool you have;
  7. Check if you don't have the old png images in the folder (if you leave them there, the file size will increase instead of decrease, but I think it is unambiguous);
  8. If you have the converted jpg images in the media folder, go back to folder word, then to _rels;
  9. In the folder _rels, open the document.xml.rels file with notepad, or your favourite text editor (Sublime Text, Notepad++, etc.);
  10. In the file, there are different Relationship nodes, replace all of the "png" extensions to "jpg" in the Target attributes where needed (eg. Target="media/image4.png" -> Target="media/image4.jpg"; most of the editors have a Replace All option in their Find/Replace dialog);
  11. Save the edited file, go back to the root folder (tmp), select all, compress them back into a zip file (Important: don't include the tmp folder, just its content!, the zip file should look like the original - renamed from docx - zip file);
  12. Rename the new zip file to docx (eg. yourdocumentname.docx), and you are done! :)


There might be a less complicated way to do this, but this shuld work. If I had a little bit more time, I would create a tool for doing all this stuff programmatically, it could be useful for me too sometimes... Or there is a tool for this on the net, idk. (I haven't met anything like this yet.)