public void OnAppendCrmContactNoteClick(Office.IRibbonControl control) { Outlook.MailItem mail = GetSelectedMail(control); if (mail == null) { return; } NewCrmNoteWindow window = new NewCrmNoteWindow(); // use WindowInteropHelper to set the Owner of our WPF window to the Visio application window System.Windows.Interop.WindowInteropHelper hwndHelper = new System.Windows.Interop.WindowInteropHelper(window); hwndHelper.Owner = System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle; // new IntPtr(Globals.ThisAddIn.Application.ActiveWindow().WindowHandle32); // show our window window.ShowDialog(); // if OK was selected then do work if (window.DialogResult.HasValue && window.DialogResult.Value) { } }