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!!
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.
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.
One of our customers had a similar problem. It appeared that his Outlook (or Office) did not have the view set at 100% ...
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.
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...] <o:OfficeDocumentSettings> <o:PixelsPerInch>72</o:PixelsPerInch> </o:OfficeDocumentSettings> </xml><![endif]-->
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??? :)
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" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
Along with this XML block inside the head of your email (I put might directly below the title tag
<!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:PixelsPerInch>96</o:PixelsPerInch> </o:OfficeDocumentSettings> </xml><![endif]-->
Hope this helps! The original post is somewhat misleading because I was a little confused about what was actually causing the issue.
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*
From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that drive real business results.Get started for free