none
How to load windows form/ user controls in current window on custom folder click using outlook add-in RRS feed

  • Question

  • I have added a solution module having a custom folder in MS outlook 2010. I need to open a windows form or a user control or a custom form region on folder click event. The form should display in main central region of same outlook window (inplace of explorer window and reading pane).

    How can I achieve this?

    Monday, February 24, 2014 1:20 PM

Answers

  • Hello Haris,

    The Outlook object model provides the BeforeFolderSwitch and FolderSwitch events (see the Explorer class for details). You can check the current folder and decide whether to show a form or not.

    Monday, February 24, 2014 3:05 PM

All replies

  • Hello Haris,

    The Outlook object model provides the BeforeFolderSwitch and FolderSwitch events (see the Explorer class for details). You can check the current folder and decide whether to show a form or not.

    Monday, February 24, 2014 3:05 PM
  • You would need to overlay your window over the Outlook window you want to cover. That involves Win32 API routines and has to be done correctly or you'll really mess up Outlook. See Steve Griffin's blog article about adjacent windows in Outlook for information about this: http://blogs.msdn.com/b/stephen_griffin/archive/2010/06/01/adjacent-windows-in-outlook.aspx

    Ken Slovak MVP - Outlook

    Monday, February 24, 2014 4:18 PM
  • You can also set MAPIFolder.WebViewOn proeptty to true and point MAPIFolder.WebViewURL to a web page (can be a local HTML page or an embedded resource in your dll) that displays your custom UI. It can host AX objects if HTML alone is not enough.


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Monday, February 24, 2014 4:23 PM