Opening a browser window..

R

Rob Meade

Hi all,

Firstly, please excuse x-post if its deemed unacceptable, I figured the
question relevant to each group where someone may have either encountered
the same problem or know the answer :eek:)

I am using the following code to open a browser window:

ActiveDocument.FollowHyperlink Address:="<my url goes here>",_
NewWindow:=True, AddHistory:=True

In our organisation I'd say we have about 90% of users running at least IE5,
if not newer, I have had a couple of instances recently though where this
code has caused an error and a "debug" prompt is given to the user.

Can anyone suggest reasons why this might not be working, such as whether
its specific to a certain version (and or SP) of Word, or whether it needs a
certain browser version etc?

Any information would be appreciated,

Regards

Rob
 
J

Jonathan West

The FollowHyperlink method throws an error if there are no documents open
in Word.

If you want the default browser to open with the specified URL, then i would
recommend you don't bother with the FollowHyperlink method, but instead use
a bit of code from Karl peterson's website.

Go to www.mvps.org/vb/, click on the Samples link on the left, and scroll
down until you come to the HyperJmp.zip sample. The sample code includes a
short routine which you can paste into your project which allows you to
specify a URL which is passed to the default browser.
 

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