follow a hyperlink from word vba autoform

Posted on 2011-04-23
Medium Priority
Last Modified: 2012-06-21
I have a word document with many autoforms and macro code. I would like to add some code that either automatically opens a specific web page or asks the user to press a button that then goes to to the web page. How do I do this? Also, is there a way to time out if the connection isn't made?
Question by:karimjohnson
LVL 33

Expert Comment

by:Paul Sauvé
ID: 35454868

Author Comment

ID: 35454870
indeed. I just don't know the syntax.
LVL 30

Accepted Solution

SiddharthRout earned 2000 total points
ID: 35455039
This is what I normally use :)

Private Sub Sample()
    On Error GoTo ErrIE
    Set browser = CreateObject("InternetExplorer.Application")
    browser.Visible = True
    browser.Navigate ("http://Google.Com")

    Exit Sub
    MsgBox Err.Description, vbInformation, "Oops"
End Sub

Open in new window


Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The SignAloud Glove is capable of translating American Sign Language signs into text and audio.
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question