
Navigating to HTML document anchors using the WebBrowser control
I know how to navigate to an HTML document with the WebBrowser control.
For example:
WebBrowser1.Navigate " http://www.*-*-*.com/ ;
The browser control will then load the HTML document, displaying it from
the top.
However, if you wanted to go to a specific anchor (or bookmark) in that
document, how do you do that? In HTML, if you had an anchor named "info",
the URL to that anchor would be:
" http://www.*-*-*.com/ #info"
But if you try the #(anchor) syntax with the WebBrowser control's Navigate
method, an automation error occurs. For example:
WebBrowser1.Navigate " http://www.*-*-*.com/ #info"
results in:
Run-time error '-2147023673 (800704c7)':
Automation error
So, how do you do it?
Do you have to do something with the Document object?
Also: there seems to be no online help for this control. Does anyone know
where it can be found?
Thanks
-pete