Hi,
Can someone tell me how can I launch a web page from a button on in a word document.
Thanks,
Craig.
Hi,
Can someone tell me how can I launch a web page from a button on in a word document.
Thanks,
Craig.
Hi Craig,
Welcome to VBAX!
Just make the button into a hyperlink and let the system take care of it.
Enjoy,
Tony
---------------------------------------------------------------
Give a man a fish and he'll eat for a day.
Teach him how to fish and he'll sit in a boat and drink beer all day.
I'm (slowly) building my own site: www.WordArticles.com
Originally Posted by TonyJollans
Thanks for the reply.
excuse my ignorance.. how do I do that? I cant see any options in the properties of the button object.
If it's a button from the Control Toolbox, right click on it in design mode, and select Hyperlink to get the dialog.
Enjoy,
Tony
---------------------------------------------------------------
Give a man a fish and he'll eat for a day.
Teach him how to fish and he'll sit in a boat and drink beer all day.
I'm (slowly) building my own site: www.WordArticles.com
Hi,Originally Posted by TonyJollans
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,Originally Posted by CJOnline
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.
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:
[VBA]ActiveDocument.FollowHyperlink "http://www.vbaexpress.com"[/VBA]
Enjoy,
Tony
---------------------------------------------------------------
Give a man a fish and he'll eat for a day.
Teach him how to fish and he'll sit in a boat and drink beer all day.
I'm (slowly) building my own site: www.WordArticles.com
Originally Posted by TonyJollans
Thanks.
That was what I needed!