Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Open URL in Microsoft Word Macro

Posted on 2009-02-09
1
Medium Priority
?
1,312 Views
Last Modified: 2012-05-06
Hello,

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
0
Comment
Question by:AncientFrib
1 Comment
 
LVL 23

Accepted Solution

by:
irudyk earned 2000 total points
ID: 23602884
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 "http://www.google.ca"
 
Dim TimeOut As String
TimeOut = Now + TimeValue("00:00:20")  '-- wait maximum of 20 seconds
 
Do While objWeb.Busy Or objWeb.readyState <> 4
    DoEvents
    If Now > TimeOut Then GoTo Done
Loop
 
Done:
objWeb.Quit
Set objWeb = Nothing
 
End Function

Open in new window

0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

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…
Microsoft Word is a program we have all encountered at some point, but very few of us have dug deep into its full scope of features, let alone customized it to suit our needs. Luckily making the ribbon (aka toolbar, first introduced in Word 2007) wo…
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …
Suggested Courses

810 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