[英]Outlook 2010 - Insert text
In Outlook 2010 using C#. 在使用C#的Outlook 2010中。
From a ribbon button, how do I add text to the top of an email body? 从功能区按钮,如何将文本添加到电子邮件正文的顶部?
This is what my goal is: User clicks on New e-Mail, then clicks on a custom ribbon button and the button adds text to the top of the body field 这就是我的目标:用户点击新电子邮件,然后点击自定义功能区按钮,该按钮将文本添加到正文字段的顶部
click another button and that same text is removed 单击另一个按钮,删除相同的文本
Kind of like a mood stamp 有点像心情邮票
Can someone point me in the direction of how to do this? 有人能指出我如何做到这一点的方向?
Here's a quick outline: 这是一个快速概述:
Application.ActiveInspector()
获取Application.ActiveInspector()
Inspector.CurrentItem
获取其Inspector.CurrentItem
MailItem
尝试将其MailItem
为MailItem
BodyFormat
阅读邮件项目的BodyFormat
Body
, RTFBody
, or HTMLBody
根据格式,您需要更改Body
, RTFBody
或HTMLBody
mailItem.Body = "My text\\r\\n" + mailItem.Body;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.