Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reducing file size of docs with images

Status
Not open for further replies.

Punce

Programmer
Mar 1, 2002
39
GB
Hi,
Is there an automated way of reducing the size of these documents. What the users here have done for years, is to use a template for various forms that contain a huge company logo that has been resized.

I can go into each document, bring the logo to the front and use the compress function, but there are literally thousands of these files.

I also noticed that converting to PDF shrinks the file size to an adequate size, but unfortunately they might need to edit these documents at a later date, so that isn't an option, but just wondered if there's a way to keep them in Word format.

A batch conversion would be even better!


 
Unfortunately, Word is crap at compressing images. You can compress them all in one go in Word, but it doesn't really do it as it still stores the original so that the Restore button works!

Best way to do this is to use an external graphics editor (I recommend the free IrfanView). Open the graphic in the editor, size it and reduce the resolution (96dpi if it is going to be screen only or 144dpi if it is to be printed). Save it to your HDD. Then use Insert, Picture from File to get it back into Word.


Regards: tf1
 
tf1 is right. Do whatever you need to do to get the graphic image the way you want. Word should NEVER be used for graphic manipulation, frankly. It sucks.

Once you have it, use a simple VBA routine to process all your files. Properly written it should not take all that long, even if you do have hundreds. One caveat though...as Word still does have some memory issues, I would recommend that you process your files in reasonable chunks, give your system a little break, then process some more. If you have hundreds and hundreds...well, it would be nice to say things would process ticky-boo, but....

The routine Dreamboat linked to is OK, but I would suggest writing it more specific for your needs.

Gerry
 
So, okay... do y'all mind if we have a little discussion here? What's the matter with Word 2003's compression button?

Double-click a graphic, click Compress, choose "all graphics in document". This considerably reduces all the files I've tried it on thus far.

While I'll likely NEVER use Word to do it because I have a fairly graphics-oriented background and can likely compress a lot more than Word does with this feature, what's the matter with this tool for the average user? Any comments?

Gerry? How are you? :) I think about you a lot.

Excel VBA Certification is Finally Here!
Check out this bar:
 
Thanks people!

One problem though, I have never used VBscript.

This is something strange I have found with the compress function... If I open the document, go into the format image screen and compress the image, it doesn't work. I have to bring the image to the front before this will work!?
 
Hi Anne. Send me a PM and I will let you know. Been a wild ride actually. Going to go do a Soulcraft workshop in California in April.

RE: discussion. I do not have 2003, and perhaps Word handles stuff better with 2003 than it does with 2002. Frankly I do not trust Word and its use of memory. As has been pointed out in similar threads, Word has that lovely restore function and has weird ideas about remembering things.

I don't know for sure. However, it makes more sense to me to have a properly done graphic and replace the graphic in each file. As opposed to processing each graphic in each file. I would think it takes far less processing to do a Replace than do a Compress. Further, I don't care how good their algorithm is, each Compress would end up with a slightly different compression. In other words, I suspect that, technically, each image in the conglomerate of files would be unique. Does this (if correct) make a difference? Probably not, but again, for clean stuff - it is better to have ONE image file (properly compressed) that is replaced into many files. Rather than multiple compressed images in many files.

Also, having the (single) compressed source image makes it cleaner to use it again for new files.

Nope. I could be convinced, but until then, using Word for graphic manipulation (at all!) is outside my scope.

Gerry
 
Anne, you can also send email to my handle at telus dot net.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top