Search code examples
outlookvstooutlook-addinmapiofficedev

Replacing part of Outlook client's window with a custom form


I am developing a VSTO application for Outlook client. I am trying have my form open in the part of the Outlook client window which is highlighted in red in the following image:

enter image description here

I think I can't use the form regions because they replace the view for a single item. So basically what I want to do is opening my custom form (windows or web) in the red area when I click my tool's button on the toolbar. Any ideas how this can be done?


Solution

  • There are three main ways for displaying your own form there:

    1. You can use the WebViewURL and WebViewOn properties of the Folder class for setting a web view state for the folder. Microsoft Outlook uses the rendering engine of the version Windows Internet Explorer installed on the client computer to display the web page. If Internet Explorer is not installed on the client computer, Outlook will not display the web page.

    2. Create an adjucent Outlook window. See Creating Adjacent Windows In Outlook for more informaiton. Note, you need to have a deep understanding of Windows API to move that way, see SetWindowsHookEx.

    3. Add-in Express provides a layout for the form out of the box. There is no need to invent a wheel in that case.

    enter image description here