Using Wildcards in Path

N

NEWER USER

I have a form with a Command button with the following Event Procedure on
Click:

Application.FollowHyperlink "C:\Program Files\Microsoft
Office\Office11\Outlook.exe", , True

It works fine and opens the application. However, some of my users have
earlier or later versions of Microsoft Office and the Outlook.exe file
resides in a different folder (Office10 or Office12). I tried the following
and unable to open file.

Application.FollowHyperlink "C:\Program Files\Microsoft
Office\*\Outlook.exe", , True

Application.FollowHyperlink "C:\Program Files\Microsoft
Office\..\Outlook.exe", , True

Any help appreciated on using wlidcards.
 
D

Douglas J. Steele

You can't use wildcards with FollowHyperlink.

Depending on what folders are in the user's path, you might be able to get
away with

Application.FollowHyperlink "Outlook.exe", , True
 
T

Tom van Stiphout

On Wed, 20 Aug 2008 05:08:10 -0700, NEWER USER

Use this:
Shell "outlook.exe",vbNormalFocus

There are no wildcards in paths. And for good reason. Consider what
would happen if there were, and if through the wildcard several
"outlook.exe" applications would be found. Which one(s) would be
opened?

-Tom.
Microsoft Access MVP
 
N

NEWER USER

Thanks for the tip, but NO such luck.

Douglas J. Steele said:
You can't use wildcards with FollowHyperlink.

Depending on what folders are in the user's path, you might be able to get
away with

Application.FollowHyperlink "Outlook.exe", , True
 

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