Target Outlook Email Clients using Conditional Comments

Using conditional comments you can target different versions of the email Outlook client and include your client specific HTML.

Targeting Outlook 2000

HTML


  <!--[if mso 9]>
    {Place your content here}
  <![endif]-->

  <!--[if lt mso 10]>
    {Place your content here}
  <![endif]-->

Targeting Outlook 2002

HTML


  <!--[if mso 10]>
    {Place your content here}
  <![endif]-->

Targeting Outlook 2003

HTML


  <!--[if mso 11]>
    {Place your content here}
  <![endif]-->

Targeting Outlook 2007

HTML


  <!--[if gte mso 9]>
    {Place your content here}
  <![endif]-->

Targeting Outlook 2007, Outlook 2010, and Outlook 2013

HTML


  <!--[if gte mso 12]>
    {Place your content here}
  <![endif]-->

Targeting Outlook 2010

HTML


  <!--[if mso 14]>
    {Place your content here}
  <![endif]-->

Targeting Outlook 2013

HTML


  <!--[if mso 15]>
    {Place your content here}
  <![endif]-->

8 Comments

  • Smit Shah says:

    how to target outlook.com?

  • Sergio Lucas says:

    Hello, what if I wanted to just target all the email clients except for Outlook ? To add specific css rules inside style tag or just add some specific tables for all the other clients ? I tried wrapping the code by :


    {Your css or html here}

    But it doesn’t work and I don’t know the reason

    • David Bedenknecht says:

      Hello Sergio,
      To target all other email clients but Outlook, you could try the following snippet which I know of but haven’t yet tested myself.
      https://stackoverflow.com/questions/5982364/is-there-a-html-conditional-statement-for-everything-not-outlook
      Let me know how you get along!
      Kind Regards,
      David

    • Sergio Lucas says:

      Hello David , I just wanted to tell you that I could add some specific HTML for all the email clients but Outlook. On the other hand, if I wrapped the style tag with all the css declarations inside the snippet, it doesn’t work . FYI
      By the way, do you know something about BB work css support ? I can’t find information about that.. thank you !

    • David Bedenknecht says:

      Hi Sergio,

      Thanks for letting me know, that’s great to hear! Funny enough I had a project this week which also required some elements to be hidden from Outlook clients ^^

      I’m afraid I am not familiar with the support of CSS in BlackBerry Work.

      Kind Regards,

      David

  • Sergio Lucas says:

    Ups, it looks like the piece of code is not showing.. I just wrap code by the conditional comment in outlook adding the exclamation mark before “mso” .. FYI

    • David Bedenknecht says:

      Thanks for the update!

      Yes, unfortunately the comments don’t want to allow HTML anymore.. I will need to fix that.

Leave a Reply

Your email address will not be published. Required fields are marked *