有人知道我可以使用一种技术来覆盖某人在 Outlook 加载项中打开电子邮件附件的情况吗?
基本上,我被要求做的是针对某些附件,更改行为,以便用户不会打开附件,而是被重定向到网页。
我可以使用 Application.AttachmentContextMenuDisplay
连接到附件上下文菜单但是,如果用户只是双击电子邮件附件,则不会触发该操作。
使用的环境是VS2010、c#、outlook 2007/2010。
最佳答案
您应该查看 ItemEvent
BeforeAttachmentRead
和 BeforeAttachmentPreview
。请参阅this related post供引用。
((Outlook.ItemEvents_10_Event)MailItem).BeforeAttachmentRead += new Outlook.ItemEvents_10_BeforeAttachmentReadEventHandler(ItemEvents_BeforeAttachmentRead);
((Outlook.ItemEvents_10_Event)MailItem).BeforeAttachmentPreview += new Outlook.ItemEvents_10_BeforeAttachmentPreviewEventHandler(ItemEvents_BeforeAttachmentPreview);
关于c# - 处理 Outlook 加载项中的附件事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9486513/