奇数< end>消息视图上的标签Outlook 2013 Microsoft Office Interop [英] Odd <end> tag on message view Outlook 2013 Microsoft Office Interop
问题描述
我创建了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.
这篇关于奇数< end>消息视图上的标签Outlook 2013 Microsoft Office Interop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!