如何在光标位置动态添加内容。即使光标在主题字段中 [英] How to Dynamically Add a content at the Cursor Position. Even if the Cursor is in Subject Field
问题描述
我已使用以下代码动态地将文本插入邮件正文,
I have dynamically inserted the Text to the mail body using the Following code ,
但是它仅在邮件正文中插入数据。我想在邮件主题中添加内容。内容将位于功能区中。
But its only insert data only in mail Body. I want to add the content even in the mail subject . The Content will be in the Ribbon.
必须根据光标位置进行。如何实现这个
This must happen based on the cursor Position. How to Achive this
我的代码
Inspector explObj = Globals.ThisAddIn.Application.ActiveInspector();
Inspector explObj = Globals.ThisAddIn.Application.ActiveInspector();
Microsoft.Office.Interop.Word.Document objDoc = explobj.WordEditor;
Microsoft.Office.Interop.Word.Selection obselection = objDoc.Application.Selection;
ThanksinAdvance
推荐答案
您好,
使用WordEditor无法在主题中添加内容。 WordEditor仅适用于项目主体。有关详细信息,请访问
第17章:使用项目实体。要添加主题,我们需要使用MailItem.Subject属性。
It is impossible to add content in subject using WordEditor. WordEditor only works for item bodies. For more information, please visit Chapter 17: Working with Item Bodies. To add subject, we need to use MailItem.Subject Property.
问候,
Celeste
这篇关于如何在光标位置动态添加内容。即使光标在主题字段中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!