Outlook 07 modifying code and causing rendering issues

I am having a strange issue relating to Outlook 2007 using Windows 7.

On my machine and through render testing the template renders as expected, but on a clients machine Outlook appears to be shrinking certain table cells and font sizes which is causing the template to break.

When the client forwards me the message as an attachment it still renders fine on my machine so it has been difficult to obtain a code sample. However, using a standard forwarded message and viewing the source, I was able to determine that for them Outlook appears to be overriding some of the inline CSS. Here is an example:

A table that is being coded at 500px like this:

<table width="500" border="0" cellpadding="0" cellspacing="0">

Is being converted to 400px:

<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" width="400" style="width:300.0pt">

The same thing is happening for table cells and font sizes. The only known difference is the make of the PC, as well as the MS office service pack. We are running SP2 while they are running SP3.

Any insight is greatly appreciated!!

roshodgekiss roshodgekiss, 3 years ago

Hi jsakas, just to clarify, is the code being altered when you forward the email message from Outlook 2007? Forwarding messages, instead of using a Forward to a Friend link does result in the code being changed in a few email clients and generally isn't recommended.

Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor
Redferret, 3 years ago

It seems to me that it could be a DPI setting in Windows 7, under the windows 7 settings you'll find the personalise tab, clck display and you'll have some percentage values on the right, and an option to change the screen DPI setting ion the left. You'll want to make sure both of these are at 100% or Windows may change the size of text and/or tables in Outlook.

Gmail app apologist
PeterH, 3 years ago

One of our customers had a similar problem. It appeared that his Outlook (or Office) did not have the view set at 100% ...

Peter van den Heuvel
B-ware Business Software
jsakas, 3 years ago

Hi all,

So after some digging I was able to find that this issue is actually caused by a setting in Microsoft Word. It seems that my initial interpretation of the issue was incorrect, and Outlook is actually increasing image sizes which makes it appear that tables and text are actually shrinking.

The setting can be found at this path:
Word options > Advanced > General / Web options > Pictures: If target monitor has the value 72 for pixels per inch, change this to 96. Restart Word & Outlook

I am now desperately seeking a way to ignore this setting somehow by coding HTML a specific way, as we are unsure how many of our recipients are seeing the rendering issues caused by these settings.

jsakas, 3 years ago

Ok... progress! But not quite there yet.

I found through looking at the code there is some MSO only XML inserted that sets the DPI based on your Word settings.

Here is the important part:

<!--[if gte mso 9]><xml>

[...omitted some code...]


If I save out the email, and leave as is, it renders as it does (incorrectly) in Outlook with the 72 DPI. If I change the value to 96 as I want it to be, it renders fine when I open in word. The issue is that when I deploy my email it removes my XML and replaces it with the original values. If I could just somehow get this value to stick, and override the users Word settings, my email would display correctly for my client.

Any ideas??? :)

jsakas, 3 years ago

Ok FINALLY found a solution!

Along with the XML you have to add a specific <html> declaration:

<html xmlns:v="urn:schemas-microsoft-com:vml"

Along with this XML block inside the head of your email (I put might directly below the title tag

<!--[if gte mso 9]><xml>

Hope this helps! The original post is somewhat misleading because I was a little confused about what was actually causing the issue.

roshodgekiss roshodgekiss, 3 years ago

Hi jsakas, thank you for sharing your fix! There's a lot of VML here that I'm not familiar with (eg. <o:OfficeDocumentSettings>), so really glad you've detailed how you've applied it here.... *gets back to a flurry of Googling*

Get in touch with us on Twitter: http://twitter.com/campaignmonitor
We're also on Facebook: http://facebook.com/campaignmonitor

Join 200,000 companies around the world that use Campaign Monitor to run email marketing campaigns that deliver results for their business.

Get started for free