Open IE from infopath button click

J

Jack

In my infopath documents there are buttons that when clicked should
open a new IE window and show a specific page on my site. I've tried
the standard code as given below, but it opens the window beneath the
infopath form. I need the zorder to be fixed so the IE window is on
top. This works fine when I use a hyperlink on the infopath form
instead of a button, but the users want a button. The code I'm using
is:

Dim ie As Object
ie = CreateObject("InternetExplorer.Application")
ie.Navigate(strURL)
ie.Visible = True

I tried another technique, in which the document came up on top, but
the problem was it started a new IE process, which forced my users to
log in to the website again, which isn't an option. The code I used
for that was:

Dim myProcess As New System.Diagnostics.Process
Dim StartInfo As System.Diagnostics.ProcessStartInfo
StartInfo = New System.Diagnostics.ProcessStartInfo("IExplore.exe",
strURL)
StartInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal
myProcess.Start(StartInfo)

If anyone has any ideas for me it would be appreciated. Thanks.
 
I

ivan.pololi

Do you use a full-trust form? (or a signed template).

I have problems with security trying to launch the same code from .NET
 

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