MailItem使用deafault设置回复 [英] MailItem Reply with deafault settings

查看:192
本文介绍了MailItem使用deafault设置回复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用原始文本+另一个文本创建了一个Mailitem回复。问题是我添加到邮件的文本没有获得font和fontsize的默认设置。我normaluy有calibri 11但是当我以纯文本发送它时,它获得字体Times new
roman。如果我发送som类型的html像< br>首先它设置为calibri 10.有没有办法让它完全像我打开邮件并开始输入?

I create a Mailitem reply with the original text + another text. The problem is that text i add to the mail doesn´t get the default settings for font and fontsize. i normaluy have calibri 11 but when i send it as plain text it gets the font Times new roman. if i send som kind of html like a <br> first it is set to calibri 10. Is there a way to get it exactly like if i would open the mail and start typing?

oReplyItem = oMailItem.Reply();                
oReplyItem.HTMLBody = sText + oReplyItem.HTMLBody; //SText is  "Testing" in this case
oReplyItem.Display();

推荐答案

Hello Ollza,

Hello Ollza,

您需要将格式正确的HTML标记设置为MailItem类的HTMLBody属性,因此您必须在内部粘贴一些文本< body> ...< / body>标签。 

You need to set a well-formed HTML markup to the HTMLBody property of the MailItem class, so you have to paste some text inside the <body> ... </body> tags. 

此外,您还可以考虑使用Word对象模型来自定义邮件正文。  Inspector类提供  WordEditor   property
,它从Word对象模型返回Document类的实例,该对象模型表示邮件正文。 Outlook使用Word作为电子邮件编辑器。 
You
可以在 

17:使用项目主体
 。要获取检查器对象,您可以使用

GetInspector
MailItem类的方法。 

Also you may consider also using the Word object model for customizing the message body. The Inspector class provides the WordEditor property which returns an instance of the Document class from the Word object model which represents the message body. Outlook uses Word as an email editor. You can read more about that in the Chapter 17: Working with Item Bodies . To get an inspector object you can use the GetInspector method of the MailItem class. 


这篇关于MailItem使用deafault设置回复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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