Consulting

Results 1 to 7 of 7

Thread: Launch IE from word

  1. #1
    VBAX Newbie
    Joined
    Mar 2005
    Posts
    4
    Location

    Exclamation Launch IE from word

    Hi,
    Can someone tell me how can I launch a web page from a button on in a word document.

    Thanks,
    Craig.

  2. #2
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    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

  3. #3
    VBAX Newbie
    Joined
    Mar 2005
    Posts
    4
    Location

    Exclamation

    Quote Originally Posted by TonyJollans
    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.

  4. #4
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    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

  5. #5
    VBAX Newbie
    Joined
    Mar 2005
    Posts
    4
    Location

    Exclamation

    Quote Originally Posted by TonyJollans
    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.

    Quote Originally Posted by CJOnline
    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.

  6. #6
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    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

  7. #7
    VBAX Newbie
    Joined
    Mar 2005
    Posts
    4
    Location
    Quote Originally Posted by TonyJollans
    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]

    Thanks.

    That was what I needed!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •