禁用 Outlook 中的发送按钮

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

制作 Outlook 插件的新手。是否可以禁用邮件项目的“发送”按钮?我尝试循环控件并使用 FindControl 函数来查找发送按钮,但找不到它。

我最近的尝试:

 Office.CommandBars commandBars = (Office.CommandBars)inspector.CommandBars;   
 Office.CommandBar standardToolbar = commandBars["Standard"];

 // Find the Send button 
 Office.CommandBarControl sendButton = standardToolbar.FindControl(
     Office.MsoControlType.msoControlButton, Type.Missing, "Send", true, true);

 // Disable the Send button
 sendButton.Enabled = false;

sendButton
始终为空。

vsto outlook-addin outlook-2016
1个回答
1
投票

发送按钮不在功能区上,因此您无法以任何方式替换或访问,但您可以处理

Application.ItemSend
事件并取消消息提交。

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