How to replace/modify Email List form region of Outlook? RRS feed

  • Question

  • Hi 

    I am trying to find a way to show custom form with custom .net controls in outlook when a user selects a particular folder. I am not able to find a way out to remove/replace/modify the region which lists emails in a folder.

    Basically, I am trying to achieve a view which would show a Navigation Pane "A" and my custom form instead of section B and C or even D.

     I have been successful in creating a form region which replaces "C" but unable to find a solution which replaces section B and C.

    At first, I am not even sure if it is possible! but if it is, how can I do it? 

    Any information would be helpful.

    Tuesday, October 24, 2017 8:18 AM

All replies

  • Hello Mutlu,

    First of all, the Outlook object model allows to show a custom web page in the specified area. The WebViewURL property of the Folder class allows to set a string indicating the URL of the Web page that is assigned to a folder.

    Sub SetupFolderHomePage() 
     Dim nsp As Outlook.NameSpace 
     Dim mpfInbox As Outlook.Folder 
     Dim mpfNew As Outlook.Folder 
     Set nsp = Application.GetNamespace("MAPI") 
     Set mpfInbox = nsp.GetDefaultFolder(olFolderInbox) 
     Set mpfNew = mpfInbox.Folders.Add("MyFolderHomePage") 
     mpfNew.WebViewURL = "" 
     mpfNew.WebViewOn = True 
    End Sub

    As a workaround you may consider subclassing Outlook windows using Windows API functions. See Creating Adjacent Windows In Outlook .

    FYI Add-in Express provides the WebViewPane layout for their forms where you can use any .net Windows forms controls. 

    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Tuesday, October 24, 2017 3:21 PM