Outlook中的条件语句 - 在一个语句中定位多个版本

时间:2016-03-15 20:23:19

标签: html email outlook conditional html-email

我正在编写电子邮件,需要定位特定版本的Outlook以修复一些违规行为。这些违规行为影响了几个版本:

  • Outlook 2007(第12版)
  • Outlook 2010(版本14)
  • Outlook 2013(第15版)

通常我可以使用以下条件有条件地定位这些版本:

<!--[if gte mso 12]>
CONTENT 
<![endif]-->

但我想要定位Outlook 2011或2016(版本16),使用gte将最终定位,而我想要使用lte定位2007及更早版本将最终定位。

这是一个2部分问题

  1. 如何编写条件代码来说<!--[if mso 12 OR mso 14 OR mso 15]>,而不必在冗长,凌乱的代码字符串中为每个版本编写实际的条件内容,例如:

    <!--[if mso 12]> One version of my content in multiple tables and cells <![endif]-->

    <!--[if mso 14]> Another version of my content with even more tables and cells <![endif]-->

  2. 我如何具体定位Outlook 2011,这也是版本14.注意:我99%确定它不可能做到这一点,但是我以为我在这里问。

1 个答案:

答案 0 :(得分:1)

不确定为什么需要区分这样,但请使用以下内容:

loc.api

的引用:

https://en.wikipedia.org/wiki/Conditional_comment

https://litmus.com/community/code/396-conditional-code-for-outlook

相关问题