View Single Post
  #1  
Old August 28th 06, 03:11 PM posted to microsoft.public.outlook.program_vba
Culverin
external usenet poster
 
Posts: 26
Default Find and run Outlook.exe

Hi:

I'm trying to find a way to find and run Outlook.exe on any user's system on
our network. Typically, Outlook.exe is located at
C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE on the user's local
disk. I need to launch Outlook from a VB Script. My code looks like this:

Set oShell = CreateObject("WScript.Shell")
oShell.Run "C:\Program Files\Microsoft Office\Office\OUTLOOK.EXE"

However, this doesn't work. I get a cannot find the file error even though
this is the location on my system . If I put a copy of Outlook.exe in a
folder on a mapped network drive it will work using the path
"//servername/folder/folder/Outlook.exe".

Does anyone have a method to find Outlook.exe wherever it may be on a user's
system (network drive or local disk) and build a path that the script shell
can run?

Thanks for your help.
Ads