Tuesday, 10 January 2012

Setting Outlook subject field from a Ribbon control

The idea is that, when the Ribbon button is clicked, the subject field will be filled.




Outlook.Inspector inspector = Globals.ThisAddIn.Application.ActiveInspector();
if (inspector.CurrentItem is Outlook.MailItem)
{
Outlook.MailItem om = (Outlook.MailItem)inspector.CurrentItem;
om.Subject = "TESTING!";
}

No comments:

Post a Comment