A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Find and run Outlook.exe



 
 
Thread Tools Search this Thread Display Modes
  #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
  #2  
Old August 28th 06, 04:12 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Find and run Outlook.exe

What version of Outlook are you running? Normally for Outlook 2003 the path
would be to
"C:\Program Files\Microsoft Office\Office11\Outlook.exe".

The path for the Outlook executable can be found in the registry. You can
try using HKLM\Software\Microsoft\Windows\CurrentVersion\App
Paths\OUTLOOK.EXE\Path to get the Outlook installation path.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Culverin" wrote in message
...
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.


  #3  
Old August 28th 06, 06:55 PM posted to microsoft.public.outlook.program_vba
Culverin
external usenet poster
 
Posts: 26
Default Find and run Outlook.exe

Thanks Ken.

It looks like using the path key has potential, but it didn't work when I
tried it. I got an invalid root in path key error. We currently have
Outlook 2000. It is installed locally on each user's machine. In a few
months we'll be going to Outlook 2003 on a thin client installation using a
Citrix server.

If I look for the key in regedit, the value is "C:\Program Files\Microsoft
Office\Office\"; which when concatenated to "Outlook.exe" as the path
argument to the shell should run Outlook. Given that I receive an invalid
root error with the code "oPath = oShell.regread(oRegKey)" and that I was
originally receiving a file not found error with simply a string as the
argument to the shell.run, I would say that there must be something I'm
missing here in how to reference the local disk on a networked machine.

Any ideas?

"Ken Slovak - [MVP - Outlook]" wrote:

What version of Outlook are you running? Normally for Outlook 2003 the path
would be to
"C:\Program Files\Microsoft Office\Office11\Outlook.exe".

The path for the Outlook executable can be found in the registry. You can
try using HKLM\Software\Microsoft\Windows\CurrentVersion\App
Paths\OUTLOOK.EXE\Path to get the Outlook installation path.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Culverin" wrote in message
...
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.



  #4  
Old August 28th 06, 09:22 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Find and run Outlook.exe

This is a hard drive on a network machine? That you'd need to access using a
UNC path or mapped network drive.

If it's a local drive on that machine the path you used should work. Other
than that the only thing I can think of would be to try one of the short
paths like C:\Progra~, etc.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Culverin" wrote in message
...
Thanks Ken.

It looks like using the path key has potential, but it didn't work when I
tried it. I got an invalid root in path key error. We currently have
Outlook 2000. It is installed locally on each user's machine. In a few
months we'll be going to Outlook 2003 on a thin client installation using
a
Citrix server.

If I look for the key in regedit, the value is "C:\Program Files\Microsoft
Office\Office\"; which when concatenated to "Outlook.exe" as the path
argument to the shell should run Outlook. Given that I receive an invalid
root error with the code "oPath = oShell.regread(oRegKey)" and that I was
originally receiving a file not found error with simply a string as the
argument to the shell.run, I would say that there must be something I'm
missing here in how to reference the local disk on a networked machine.

Any ideas?


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2000 SCANCAL.EXE mcguganw Outlook - Calandaring 5 July 8th 06 10:32 PM
can't find outlook express now I've run Outlook Cathy Wilkin Outlook - Installation 6 June 29th 06 09:38 PM
Scanpst.exe can no longer be run rmcompute Outlook - Installation 9 May 24th 06 12:37 AM
Can not find the "OutlookSecureTempFolder" using regedit.exe Richard Outlook - Installation 1 May 20th 06 06:19 AM
outlook.exe-application error ramosp1 Outlook - Using Contacts 0 March 10th 06 10:38 PM


All times are GMT +1. The time now is 12:22 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.