Open URL in Microsoft Word Macro

Posted on 2009-02-09
Last Modified: 2012-05-06

I simply want to open a URL in a Microsoft Word macro.  I don't need a browser to open.  In opening this URL I would cause a script to run and I would NOT need to display anything to the user.  Any help is appreciated
Question by:AncientFrib
    1 Comment
    LVL 23

    Accepted Solution

    I don't know if this will work, but the following will open up a URL in a web browser that won't be visible and which will close after the web page URL has finished loading.  Maybe give that a try and see if it works on your URL.
    Function HyperlinkOpen()
    Dim objWeb As Object
    Set objWeb = CreateObject("InternetExplorer.Application")
    objWeb.Navigate ""
    Dim TimeOut As String
    TimeOut = Now + TimeValue("00:00:20")  '-- wait maximum of 20 seconds
    Do While objWeb.Busy Or objWeb.readyState <> 4
        If Now > TimeOut Then GoTo Done
    Set objWeb = Nothing
    End Function

    Open in new window


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Like many others, we try and discourage users from printing documents unnecessarily and instead send or share them electronically. However, this doesn't always work and documents are still printed. With this simple solution, if the user tries to …
    Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
    This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
    Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now