IE popup in Outlook 12.0

M

malar

We have created an outlook addin, in which clicking a button an IE window is
popped up. We use the InternetExplorer.Navigate2() method to popup the new
window which is present in the Interop.SHDocVw dll. The window opens "always
on top" with Outlook 2003 and IE6 or 7 provided the Microsoft Outlook 11.0
object library (9.2) .

We are in the process of migration to Outlook 2007 and we included Microsoft
Outlook 12.0 object library 12.0.4518.1014 to build the solution. No code
change on the Navigation part. But we see a different behaviour. Its always
displayed as minimized blinking window in the taskbar. The end users have to
explicitly click the minimized tab to bring the window to the foreground.



Here is the code sample



Private Sub btnAttachToDIAMSXe_Click(ByVal ctrl As CommandBarButton, ByRef
cancel As Boolean)

....................

Dim ieCtrl As New InternetExplorer

....................

....................

....................

ieCtrl.Navigate2("http://localhost/....", 1, "DIAMSXe External
Interface", postData, postHeader)

ieCtrl.Visible = True

....................

End Sub



Does anyone have any idea why the popup window appears minimized with the
Office 2007 and IE7 combination ? or is there a better way of

popping up a window through outlook addins.
 
K

Ken Slovak - [MVP - Outlook]

I usually don't limit things to IE, I try to use the default browser if
there is one. I get that using the following C# code, then I start the
browser with the URL:

RegistryKey key =
Registry.ClassesRoot.OpenSubKey(@"HTTP\shell\open\command", false);
string browser = key.GetValue(null).ToString().ToLower().Replace("\"",
"");
if ((!browser.EndsWith("exe")
{
browser = browser.Substring(0, browser.LastIndexOf(".exe") + 4);
}

Process p = new Process();
p.StartInfo.FileName = browser;
p.StartInfo.Arguments = url; // url is where we want to go
p.Start();

This snippet of course has no exception handling, which should be added.
 
T

TMJNSK

Thanks for the response.

Our product purely support IE, No other browser.

If we use eCtrl.Navigate2, it opens IE and the current process will
not wait for anything and it will be free. If we use Process(), will
current process be free after calling p.start()?
 
K

Ken Slovak - [MVP - Outlook]

If I understand what you're asking the browser window opens non-modally and
your code continues as does the user interface.
 
T

TMJNSK

We are passing lot of form variable which cannot be passed by query
string (special char) on the URL. How can i do the same process
( ).

Thanks
 
T

TMJNSK

Private Declare Function BringWindowToTop Lib "user32" (ByVal _
hwnd As Long) As Long

ieCtrl.Navigate2()
BringWindowToTop(ieCtrl.hwnd)

resolved this above issue...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top