Adding button to mail form.

  • Thread starter morrris via OfficeKB.com
  • Start date
M

morrris via OfficeKB.com

I am looking to add a button to the outlook mail form, actually replace the
<To:> button, or change its action. I am able to create the button on the
page using the inspector event and call the interface on this page, I am
using C++/atl.

m_Inspector=spInspector;

CComPtr<Office::_CommandBars> pCmdBars;
HRESULT hr = spInspector->get_CommandBars(&pCmdBars);
IDispatch* mailitem;
spInspector->get_CurrentItem(&mailitem);
//etc to add the button to commandbar


Are these accessed using the MailItem? Am I on the right track. Ive pretty
much just googled my way this far, this is my first outlook addin. Any
help would be appreciated. Also are there many differences interface wise
between the mail form when the message is being edited with Word, and not.
I seem to get some different behaviors when trying to extend the forms.

thanks again
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top