制作 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
始终为空。
发送按钮不在功能区上,因此您无法以任何方式替换或访问,但您可以处理
Application.ItemSend
事件并取消消息提交。