如何在资源管理器阅读窗格中获取当前所选电子邮件的WordEditor属性?

问题描述 投票:0回答:1

我实现了电子邮件的上下文菜单,其中包括资源管理器阅读窗格。要在鼠标右键单击时获取文本,请使用WordEditor。我认为没有其他方法可以找到鼠标单击的位置。

'_olItem comes from the current selection
olInspector = CType(_olItem.GetInspector, Outlook.Inspector)
wDoc = CType(olInspector.WordEditor, Word.Document)
'then go off and work with word

对于资源管理器阅读窗格是通过首先调用GetInspector来获取WordEditor的唯一方法?

问的一个原因是我看到Inline responses Outlook has the ActiveInlineResponseWordEditor属性。

我的插件还监听新的检查员

Private Sub oInsps_NewInspector(ByVal Inspector As Microsoft.Office.Interop.Outlook.Inspector) Handles oInsps.NewInspector
'do something here with this inspector
End Sub

如果无法避免调用GetInspector来获取单词编辑器,那么在newinspector事件触发时,该检查器是否具有属性,以告诉我该检查器实际上是来自阅读窗格,而我是通过调用GetInspector来进行此检查的?

vsto outlook-addin
1个回答
0
投票

使用Explorer.PreviewPane.WordEditor

© www.soinside.com 2019 - 2024. All rights reserved.