奇数< end>消息视图上的标签Outlook 2013 Microsoft Office Interop [英] Odd <end> tag on message view Outlook 2013 Microsoft Office Interop

查看:124
本文介绍了奇数< end>消息视图上的标签Outlook 2013 Microsoft Office Interop的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Microsoft.Office.Interop.Outlook,VB.net和Office 2013生成一个MailItem,然后将该项目发送到Outlook,显示电子邮件窗口,让用户从Outlook 2013中进行编辑/发送我正在做的主要事情是:



我创建了Microsoft.Office.Interop.Outlook.MailItem对象并填写相关信息,我生成一个HTML对于身体这样的常数

  Private Const mstrHTML_FORMAT As String =< html>< p style ='font-size :10PT;字型family:宋体;'> {0}< / p>< / HTML>中

然后我添加一个字符串变量strBody的文本,并使用String.Format插入文本在我的对象的HTMLBody中:

  objMailItem.HTMLBody = String.Format(mstrHTML_FORMAT,strBody)

我还将身体的格式更改为HTML:

  objMailItem.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML 

经过几个其他步骤后,我将其发送到视图

  objMailItem.Display(True)

我的问题是,当用户发送电子邮件时,接收者会看到电子邮件中有一个带有主题的消息为Text


为什么会发生这种情况的任何线索?



解决方案

Outlook有意将结束> 查看身体不够长以填充预览。



这不是由您的代码或任何不良的HTML格式导致的。


I'm using Microsoft.Office.Interop.Outlook, VB.net and Office 2013 to generate a MailItem, and then send the item to Outlook, show the email window and let the user edit it/send it from Outlook 2013. The main things I'm doing are:

I create the Microsoft.Office.Interop.Outlook.MailItem object and fill it with the relevant information, I generate an HTML constant for the body like this

Private Const mstrHTML_FORMAT As String = "<html><p style='font-size:10pt;font-family:Arial;'>{0}</p></html>"

Then I add the text I want to a string variable strBody and use String.Format to insert the text in the HTMLBody of my object:

objMailItem.HTMLBody = String.Format(mstrHTML_FORMAT, strBody)

I also change the format of the body to HTML:

 objMailItem.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML

After a few other steps I send it to the view

objMailItem.Display(True)

My problem is, when the user sends the email, the receiver will see that the email has a message with the subject as Text

any clue of why this happens?

解决方案

Outlook purposely puts <end> in the message preview when the body isn't long enough to fill the preview.

It's not caused by your code or any bad HTML formatting.

这篇关于奇数&lt; end&gt;消息视图上的标签Outlook 2013 Microsoft Office Interop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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