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

纵然是瞬间 提交于 2020-07-09 07:11:01

问题


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:

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?


回答1:


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.




回答2:


You will need to get down to the HWND level to insert your UI - see https://blogs.msdn.microsoft.com/stephen_griffin/2010/06/01/adjacent-windows-in-outlook/ and https://code.msdn.microsoft.com/OlAdjacentWindows/



来源:https://stackoverflow.com/questions/42352369/replacing-part-of-outlook-clients-window-with-a-custom-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!