简体   繁体   English

我可以使用 GetInspector.CommandBars.ExecuteMso 在 Outlook Email 上设置权限选项吗?

[英]Can I use GetInspector.CommandBars.ExecuteMso to set a permission option on an Outlook Email?

I am trying write an Outlook Add-In that would create an email, set a specific permission from the Permission dropdown in Outlook to encrypt the email, and then sent out the email. The encrypt permission come from an Information Rights Management template.我正在尝试编写一个 Outlook 加载项,它将创建一个 email,从 Outlook 的权限下拉列表中设置特定权限以加密 email,然后发送 email。加密权限来自信息权限管理模板。 To access the specific permission.访问特定权限。 I am trying to using mailItem.GetInspector.CommandBars.ExecuteMso我正在尝试使用mailItem.GetInspector.CommandBars.ExecuteMso

I am trying to determine:我正在尝试确定:

  1. Is this the best way to access the encrypt option from the permission drop down in Outlook?这是从 Outlook 中的权限下拉菜单访问加密选项的最佳方式吗?
  2. If so, which Mso am I to use in mailItem.GetInspector.CommandBars.ExecuteMso ?如果是这样,我应该在mailItem.GetInspector.CommandBars.ExecuteMso中使用哪个 Mso?

I've tried mailItem.GetInspector.CommandBars.ExecuteMso("PermissionRestrictMenu") , which give me the error Message: Value does not fall within expected range我试过mailItem.GetInspector.CommandBars.ExecuteMso("PermissionRestrictMenu") ,它给我错误消息:值不在预期范围内

and mailItem.GetInspector.CommandBars.ExecuteMso("PermissionRestrict") which selects the default permission, which is not the option I am looking for.mailItem.GetInspector.CommandBars.ExecuteMso("PermissionRestrict")选择默认权限,这不是我正在寻找的选项。

The CommandBars.ExecuteMso method works on controls that are built-in buttons , toggleButtons , and splitButtons . CommandBars.ExecuteMso方法适用于内置buttonstoggleButtonssplitButtons的控件。 There is no menus in the list of supported UI controls.支持的 UI 控件列表中没有菜单。

As a possible workaround you may use any low-level API exploring tool such as MFCMAPI or OutlookSpy for checking properties set after changes made in the Outlook UI.作为一种可能的解决方法,您可以使用任何低级 API 探索工具(例如MFCMAPIOutlookSpy )来检查在 Outlook UI 中进行更改后设置的属性。

Another workaround is to use Microsoft Active Accessibility API which is a Component Object Model (COM)-based technology that improves the way accessibility aids work with applications running on Microsoft Windows. It provides dynamic-link libraries that are incorporated into the operating system as well as a COM interface and API elements that provide reliable methods for exposing information about UI elements.另一种解决方法是使用Microsoft Active Accessibility API,它是一种基于组件 Object Model (COM) 的技术,可改进辅助功能与在 Microsoft Windows 上运行的应用程序配合使用的方式。它还提供并入操作系统的动态链接库作为 COM 接口和 API 元素,它们提供可靠的方法来公开有关 UI 元素的信息。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Outlook 2010中的CommandBars - CommandBars in outlook 2010 如何从CommandBars.ExecuteMso调试E_FAIL? - How to debug E_FAIL from CommandBars.ExecuteMso? 如何在C#中为Outlook中的电子邮件设置Azure信息保护标签之一? - How I can set one of Azure information Protection Labels for email in Outlook in C#? Outlook插件-如何在VSTO中使用C#发送的电子邮件上设置“高重要性” - Outlook Addin - How can I set “High Importance” on email sent using C# in VSTO MailItem.GetInspector.WordEditor 在 Outlook 2013 AddIn 上始终为 NULL - MailItem.GetInspector.WordEditor is NULL on Outlook 2013 AddIn all the time 如何在Outlook电子邮件中分隔一些具有相同名称的附件? - How can I separate some attachments with the same name in outlook email? 发送电子邮件时,Interop.Outlook中缺少权限 - Lack of Permission in Interop.Outlook when sending Email C# VSTO Outlook 插件 - 如何使用传出 Z0C83ZEFA57C7831CEB7B24 获取发送方的 email 地址? - C# VSTO Outlook plugin - How can I get the email address of the sender of an outgoing email using Exchange? 选择电子邮件后如何存储/显示电子邮件正文? (2013年展望) - How do can I store/display the body of an email after selecting the email? (outlook 2013) 我们可以使用 Outlook 文件类型(.oft)模板并使用 smtp 邮件服务器发送电子邮件吗? - Can we use outlook file type(.oft) template and send email using smtp mail server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM