Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / October 2004

Tip: Looking for answers? Try searching our database.

vbscript code to launch web page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GaryM - 14 Oct 2004 15:55 GMT
Help
I need to launch a web page using a button control from an infopath form.
Can anyone help with the vbscript
Thanks
GaryM
Scott Roberts [MSFT] - 20 Oct 2004 18:30 GMT
There may be other ways but one way to do this is to use CreateObject with
InternetExplorer.Application.  Then you can navigate to a web page using the
IE object model. Since you are calling CreateObject, your form template will
need to be in full trust mode.

Here is rough pseudocode:

Dim IE As ShDocVw.InternetExplorer
Set IE = CreateObject("InternetExplorer.Application")

IE.Visible = True
IE.Navigate(http://foo.com)

There is more information about the InternetExplorer object in MSDN.

There are various other ways to do this but this is the first one that comes
to mind.  One other way would be to use the Shell object's ShellExecute
function. However, each of these solutions involves an ActiveX control which
means that your solution will need to be full trust.

- Scott

> Help
> I need to launch a web page using a button control from an infopath form.
> Can anyone help with the vbscript
> Thanks
> GaryM
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.