Many Pies

Many Pies

Thursday, April 27, 2006

For the last few hours I've been wrestling with Word and Outlook to do an email mail merge which has embedded images. The reason I want them embedded is that Word recompresses them and makes them look worse than the originals.

My embedded I mean that the email is HTML and the original images live on a webserver, rather than being attachments to the email.

After much searching I found the answer on microsoft.public.word.mailmerge.fields in a thread entitled "email merge - problem with embedded images". (I won't link to the thread as such links would probably not work in future.)

The next problem was picture size. Even though I thought jpg pictures were just pixels, it appears that it is possible (using Microsoft Photo editor) to say how many pixels per cm (or inch) they should be displayed at. Word uses this information when displaying images, and then converts it to HTML when sending it. The trouble is when the email is received the picture is resized. For example, if the original image is 640 pixels wide and Word sends HTML saying the picture should be displayed at 500 pixels wide it is displayed as such, meaning that pixels are dropped, meaning the picture doesn't look good. (Word does the same resizing, but has a better algorithm for resampling the image.) After experimenting I found that setting pixels per cm to 30 gave a decent image. I guess because Word is page and printer orientated it has to assume something for how big to display a picture.

No comments: