Search code examples
vb.netoutlookoutlook-addin

Get current Outlook Window as Form


How can I get the Outlook windows from which is the Ribbon button is called as Form in vb.net?


Solution

  • All callbacks (e.g. button click event handlers) receive IRibbonControl as the parameter. IRibbonControl.Context property can be cast to either Inspector or Explorer object depending on where the button is hosted.