VBA Code to open a Web site or pdf document

J

John Morley

Please help with the VBA code, that will work with Word X on a Mac,
that would open a Web site and also the code to open a pdf document at
a known path on the hard drive.

I want to use this so that a user can go to a menu and click an entry
to get access to the appropriate Web site or click a different entry
to open the pdf document.

Any help would be appreciated.

John Morley
 
J

Jim Gordon MVP

Hi

In the Visual Basic Editor (from Word's menu choose Tools > Macro > Visual
Basic Editor) search the Help for
FollowHyperlink Method

Click on "Example" to obtain the code sample you need.

-Jim Gordon
Mac MVP

All responses should be made to this newsgroup within the same thread.
Thanks.

About Microsoft MVPs:
http://www.mvps.org/

Before posting a "new" topic please be sure to search Google Groups to see
if your question has already been answered.

An Excel add-in is available to help with this task.
<http://www.rondebruin.nl/Google.htm>
 
J

John McGhie [MVP - Word]

Hi John:

Use the Macro Recorder while stepping through the actions you want. It will
write the code for you.

Cheers

This responds to microsoft.public.mac.office.word on 15 Jan 2004 09:20:40
-0800, (e-mail address removed) (John Morley):
 
J

John Morley

Thanks John,

As much as I appreciate your help, recording the macro did not work
for me. I suspect that it was because when I left the Word
application, to open the browser or pdf file, the macro recorder could
no longer follow what was going on.

In any case, the FollowHyperlink statement suggested by Jim Gordon did
the trick.
 
J

John Morley

Thanks Jim,

The FollowHyperlinklink method worked fine for both needs.

John Morley
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top