Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Navigate2 method of WebBrowser Control??????

Status
Not open for further replies.

JOsborne

Technical User
Mar 5, 2006
7
GB
I need to navigate to a file, not a URL, from a vb app, and have it display in my web browser control on the form.

The file is an HTML file, and Navigate2 is supposed to applow you to navigate to a file as well as a URL, but how do I use it?

wbBrowser1.Naviagte2 "path"

does not work!!!!

 
Use Navigate if you are not using CSIDL constants to navigate to special folders, Navigate2 if you are.

popular special folder consts:

Public Const CSIDL_FAVORITES As Long = &H6
Public Const CSIDL_DESKTOPDIRECTORY As Long = &H10 '{user name}\Desktop
Public Const CSIDL_COMMON_FAVORITES As Long = &H1F
Public Const CSIDL_INTERNET_CACHE = &H20
Public Const CSIDL_PROGRAM_FILES = &H26
Public Const CSIDL_HISTORY = &H22

your navigate may not have worked because you enclosed path in double quotes.
 
Im doing exactly what you say and it works. I suppose you are not enclosing the variable containing the path for the file you want to open between quotation marks, are you?
Also, check the path is correct. It should work fine. Im using vb6 with IE5.5...check your versions
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top