在Word和Outlook 2010中过滤HTML [英] Filtered HTML in word and Outlook 2010

查看:101
本文介绍了在Word和Outlook 2010中过滤HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开发一个内部应用程序,它将组成一个HTML消息,但不会通过交换发送它。 相反,我们将使用outlook来组成html,然后将生成的HTML转发给第三方服务器。


我们注意到来自MailItem.HTMLBody的HTML与您获得的HTML不同HAD通过"发送"发送相同的html。 。按钮 在内部,outlook似乎将文档保存为"已过滤的HTML",这是一个剥离的
向下HTML,没有该词用于编辑的所有内部标记。 



我发现你也可以通过调用inspector.WordEditor.SaveAs2(filename,Format = FilteredHTML)来获取过滤后的html


该函数创建一个非常接近outlook文件但不完全相同的文件。  outlook html引用的一些样式小于SaveAs2版本中的样式。



在Outlook保存文件中,您得到:



  ;  




< meta 名称 =生成器 含量 <温泉n style ="color:#0000ff; font-size:small"> =" Microsoft
Word 14(过滤媒体)">



在Word SaveAs2版本中,你得到了



   





< meta name =生成器 content =" Microsoft
Word 14(已过滤)">





问题:  2种格式之间的区别是什么?如何让它给出我和outlook发出的输出相同吗?IE"Filtered Medium"


解决方案

您好CDOfficeDev,


您是否通过VBA开发应用程序?


>> inspector.WordEditor.SaveAs2(filename,Format = FilteredHTML)


使用此功能,我认为你无法获得过滤介质。我在Word下使用SaveAs和wdFormatFilteredHTML进行测试,它将输出过滤而不是过滤介质。


>>< metaname = Generatorcontent =" Microsoft Word 14(过滤媒介)">


你能否分享一下我们是如何得到这个保存的文件的?我尝试用html格式保存电子邮件,b我在Outlook 2013下失败了。


如果在保存电子邮件到html之前保存当前的电子邮件,结果会有所不同吗? ?


最好的问候,


爱德华


We are developing an application inside outlook that will compose an html message but will not send it through exchange.  instead, we will use outlook to compose the html then forward the resulting HTML to a third party server.

We noticed that the HTML from MailItem.HTMLBody is not the same HTML you get if you HAD sent the same html through the "Send" button.  It seems that internally, outlook is saving the document as an "Filtered HTML", which is a stripped down HTML without all the Internal markup that word uses for editing. 

I found that you can also get filtered html by calling inspector.WordEditor.SaveAs2( filename, Format=FilteredHTML )

That function creates a file that is very close to outlook's file but not quite the same.  Some styles referenced by outlook html are smaller than those in the SaveAs2 version.

In outlook saved file, you get:

   

<metaname=Generatorcontent="Microsoft Word 14 (filtered medium)">

IN Word SaveAs2 Version, you get

   

<metaname=Generatorcontent="Microsoft Word 14 (filtered)">

Question:  What is the difference between the 2 formats and How can I get it to give me same output as outlook is sending out? I.E. "Filtered Medium"

解决方案

Hi CDOfficeDev,

Do you develop your application by VBA?

>> inspector.WordEditor.SaveAs2( filename, Format=FilteredHTML )

With this function, I think you could not get filtered medium. I made a test with SaveAs and wdFormatFilteredHTML under Word, it would output the filtered instead of filtered medium.

>> <metaname=Generatorcontent="Microsoft Word 14 (filtered medium)">

Could you share us how did you get this saved file? I try to save the email message with html format, but I failed under Outlook 2013.

If you save your current email before save the email to html, will it be different result?

Best Regards,

Edward


这篇关于在Word和Outlook 2010中过滤HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆