Outlook 2003 Word as Editor and .NET Forms

Posted on 2008-11-09
Last Modified: 2013-11-10
Our company has been working on an Outlook AddIn using VSTO which has a number of issues which we have not been able to resolve yet.
We would appreciate any insight or assistance you can offer.

Our .NET AddIn includes support for using Word as editor in Outlook 2003. On the editor window we add a custom command bar button that launches a .NET form. The problem is that the .NET form does not always appear in front of the inspector when Word is being used as the editor.
I have attempted to use the .NET methods and properties available on the Form (TopLevel, TopMost, BringToFront) to make it appear above the Outlook window but none of them were consistently working.

Is there any way I can ensure the .NET form comes out on top as our users are becoming frustrated with this? Thanks.
private void OnSendAndLogClick(Office.CommandBarButton Ctrl, ref bool CancelDefault)


 // Other code 

 using (FrmRegisterDMSEmail registerscreen = new FrmRegisterDMSEmail(_registerEmail))


  if (registerscreen.ShowDialog() == DialogResult.OK)





 // Other code


Open in new window

Question by:timetracer
    1 Comment

    Accepted Solution

    I have been able to resolve this issue by getting the handle of the Word Editor window with the FindWindow API call (the class is "OpusApp" and the caption is the caption of the inspector window).

    I then wrapped the window handle in a class which implements the IWin32Window interface, and can therefore be passed to ShowDialog.

    These steps caused the .NET form to correctly appear in front every time on the development machine.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    Use email signature images to promote corporate certifications and industry awards.
    Outlook Free & Paid Tools
    This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now