alexpgp: (Default)
[personal profile] alexpgp
My client sends me a huge (50 MB) Word file that frankly, can only be transmitted using exceptional means (i.e., Dropbox, Skype) because few, if any, email systems will allow attachments of such size. My task is not to translate the monster, but to reduce the size of the file.

My first step involved doing a search-and-replace on the graphics, searching for ^g and replacing with nothing. The resulting file was less than 2 MB in size, so it's a safe bet that reducing the size of the graphics (in the sense of data volume, as opposed to display dimensions) is called for.

I did not quite write a macro to do this, but I think one could be written with little trouble. The general algorithm would be:
  1. Make sure ImageMagick is installed with the legacy convert option enabled.
  2. In Word, find the next graphic
  3. Cut the graphic to the clipboard.
  4. From a DOS command line, in a known directory (say, C:\temp) run the command convert clipboard:myimage image.png.
  5. In Word, click on Insert|Pictures, navigate to the known directory from step 4 (this only needs to be done the first time), select image.png and click on Insert.
  6. Unless all of the graphics have been replaced, go to step 2 and repeat the subsequent steps.

The final product was a hair over 6 MB in size, which is still large enough to make some email systems gag, but completely usable elsewhere.

Excelsior!

Profile

alexpgp: (Default)
alexpgp

January 2018

S M T W T F S
  1 2 3456
7 8910111213
14 15 16 17181920
21222324252627
28293031   

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 28th, 2025 07:06 am
Powered by Dreamwidth Studios