Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Disable the send button in Outlook

New to making an outlook addin. Is it possible to disable the Send button for a mail item? I have tried looping through controls and using the FindControl function to find the send button but cannot find it.

My latest attempt:

 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 is always null though.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Send button is not on a ribbon, so you cannot replace or access in any way, but you can handle Application.ItemSend event and cancel the message submission.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading