PDA

View Full Version : Launch IE from word



CJOnline
03-22-2005, 04:47 AM
Hi,
Can someone tell me how can I launch a web page from a button on in a word document.

Thanks,
Craig.

TonyJollans
03-22-2005, 05:25 AM
Hi Craig,

Welcome to VBAX!

Just make the button into a hyperlink and let the system take care of it.

CJOnline
03-22-2005, 07:47 AM
Hi Craig,

Welcome to VBAX!

Just make the button into a hyperlink and let the system take care of it.


Thanks for the reply.

excuse my ignorance.. how do I do that? I cant see any options in the properties of the button object.

TonyJollans
03-22-2005, 08:35 AM
If it's a button from the Control Toolbox, right click on it in design mode, and select Hyperlink to get the dialog.

CJOnline
03-22-2005, 09:08 AM
If it's a button from the Control Toolbox, right click on it in design mode, and select Hyperlink to get the dialog.

Hi,
I am using word 2000, when I drag the button onto the word document and right click it in design mode the options I get are, properties,view code and format control.. no hyperlink option exists anywhere?

Regards,
Craig.


Hi,
I am using word 2000, when I drag the button onto the word document and right click it in design mode the options I get are, properties,view code and format control.. no hyperlink option exists anywhere?

Regards,
Craig.

Hi,
I tried the same on office 2003, and the hyperlink option is there. after adding the hyperlink and clicking the button in online mode, the button does nothing.. no IE window is opened?

Regards,
Craig.

TonyJollans
03-22-2005, 11:20 AM
My apologies, Craig,

I should've tried it first!

That is really strange - what is the point of being able to set a hyperlink and not follow it? Incidentally, in 2000, you can select the button and press Ctrl+k to achieve the same useless effect.

Try this instead:

In the code behind the button (right click it and View Code - but this option doesn't appear if you have a hyperlink set to the button) put:

ActiveDocument.FollowHyperlink "http://www.vbaexpress.com"

CJOnline
03-23-2005, 02:22 AM
My apologies, Craig,

I should've tried it first!

That is really strange - what is the point of being able to set a hyperlink and not follow it? Incidentally, in 2000, you can select the button and press Ctrl+k to achieve the same useless effect.

Try this instead:

In the code behind the button (right click it and View Code - but this option doesn't appear if you have a hyperlink set to the button) put:

ActiveDocument.FollowHyperlink "http://www.vbaexpress.com"


Thanks. :beerchug:

That was what I needed!