{"componentChunkName":"component---src-templates-blog-post-js","path":"/2005/04/04/adding-a-button-to-outlooks-context-menu/","result":{"data":{"site":{"siteMetadata":{"title":"DeveloperZen Archives"}},"markdownRemark":{"id":"4eca789d-337c-54b1-98da-a0ebf9ae18f9","excerpt":"Took me a while to figure this one out… To add a button to the Outlook explorer context menu you need to get the “Context Menu” CommandBar.  This command bar…","html":"<p>Took me a while to figure this one out…</p>\n<p>To add a button to the Outlook explorer context menu you need to get the “Context Menu” CommandBar.<br>\nThis command bar instance is only created when the user right clicks in the explorer so in order to know when such a bar is<br>\ncreated you have to listen to the OnUpdate event of the Explorer’s CommandBars collection.<br>\nInside the OnUpdate event handler you can check if the context menu CommandBar exist :</p>\n<p><span style=\"FONT-SIZE: 11px; COLOR: black; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent\">CommandBar bar <span style=\"FONT-SIZE: 11px; COLOR: red; FONT-FAMILY: Courier New; BACKGROUND-COLOR: transparent\">=</span> ActiveExplorer.CommandBars[<span style=\"FONT-SIZE: 11px; COLOR: #666666; FONT-FAMILY: Courier New; BACKGROUND-COLOR: #e4e4e4\">“Context Menu”</span>];</span></p>\n<p>After getting the conext menu CommandBar you need to change it’s Protection property to allow customization, add your button, and change the Protection back.</p>\n<p>That’s it… enjoy 🙂</p>","frontmatter":{"title":"Adding a button to Outlook's context menu.","date":"April 04, 2005","description":""}}},"pageContext":{"slug":"/2005/04/04/adding-a-button-to-outlooks-context-menu/","previous":{"fields":{"slug":"/2005/04/02/organizing-your-code/"},"frontmatter":{"title":"Organizing your code"}},"next":{"fields":{"slug":"/2005/04/18/visual-studio-2005-beta2-is-out/"},"frontmatter":{"title":"Visual Studio 2005 beta2 is out!"}}}},"staticQueryHashes":["1246554614","2841359383"]}