Link to home
Start Free TrialLog in
Avatar of willwatters
willwatters

asked on

Starting MS Outlook

How do i start MS Outlook in VB script please?
ASKER CERTIFIED SOLUTION
Avatar of JR2003
JR2003

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of anv
anv

dim wshshell
set wshshell = CreateObject("Wscript.Shell")
wshshell.run("Outlook.exe")


mero
what do you mean by start. If you want to use the different APIs related to outlook then you can use the methods mentioned in the above posts. If you want to launch outlook from your VB application then use this technique

Shell "D:\Program Files\Microsoft Office\Office10\outlook.exe", vbNormalFocus

execute the exe from its path


hamood
hamood,
that's ok to use that method if you know the path of outlook.exe, but what the vb script is used on a different machine where the installation path is different?
JR
Avatar of willwatters

ASKER

I tried this code, but i just want to outlook to open initially.  Outlook opens, but it doesn't show this as it is invisible.  I tried using i.e

Set myOlApp = CreateObject("Outlook.Application")
myOlApp.Visible = True

But this didn't work.
This will not launch the outlook. It can used for calling Outlook API in the code. Secondly you have to add the reference of outlook APIs in the vb6 project.
Go to

Visual Studio --> Projects -->References --> select Miscorosoft Outlook 10.0 Object Library

For launching the outlook use the mehtod mentioned by me or by willwatters

Hamood