在 Outlook 中获取选定的附件
我正在使用一个插件,它使我能够将上下文菜单附加到 Outlook 附件。因此,当我单击附件时,我可以在上下文菜单中看到我的自定义按钮。
我面临的问题是,我如何知道点击了哪个附件。我脑子里有一些替代方案
当上下文菜单打开时,我可以将一个标签关联到该上下文菜单。在这个标签中,我可以存储附件的文件名。使用此文件名,我可以识别 context_menu_button_click 事件中的附件。目前,我找不到上下文菜单告诉打开上下文菜单的对象的位置。
我循环遍历检查器或任何其他对象中可用的一些属性,这些属性告诉我选择了电子邮件内的哪个对象。为此,我可以访问选定的电子邮件,也可以遍历所有附件,但我无法弄清楚选择了哪个附件(或右键单击)
I am using an addin which enable me to attach a context menu to outlook attachments. So when ever I click on an attachment I am able to see my custom button in the context menu .
The problem I am facing is, how do I know which attachment is clicked. I have some alternatives in my mind
When context menu is opening, I can associate a tag to this context menu. In this tag , i can store the file name of the attachment. Using this file name I can identify the attachment in context_menu_button_click event. Currently I cannot find a place where context menu tells about the object, on which context menu was opened.
I loop through some property available in inspector or any other object which tell me which object, inside the email is selected. For this, I can get to the selected email and I can also iterate through all attachments, but I cannot figure out which attachment is selected (or right clicked)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
感谢 这篇 SO 帖子
可以翻译成...
现在 使用
attachmentSelection
对象可能会解决问题......!Thanks to this SO post
Which can be translated into...
Now using
attachmentSelection
object may solve the problem....!使用 Explorer/Inspector.AttachmentSelection 集合。
Use Explorer/Inspector.AttachmentSelection collection.