How can I shutdown Outlook 2003 from the command line ?

  • Thread starter Thread starter ScottHW
  • Start date Start date
S

ScottHW

I maintain my PST files on an encrypted volume, which is locked for backup
purposes as long as OL is running. I have batch file that I run my backup
routine from, but I need to shutdown Outlook before doing the backup so I
can then dismount the virtual voume and backup the volume file.

How can I shutdown Outlook from the coomand line ? KILL seems a bit
drastic, scared it will leave things a mess.

Thanks,
Scott
 
There is no command line option, but this WSH/VBScript file might work.

Set objOutlook = CreateObject("Outlook.Application")
objOutlook.Quit
Set objOutlook = Nothing
 
There's no command line switch for closing Outlook and just killing it may
not properly shut things down. You could use a script that is called from a
shortcut, that would do what you want. The script would look something like
this:

Dim oOL 'As Outlook.Application
Set oOL = GetObject(, "Outlook.Application")
If Not (oOL Is Nothing) Then
'Outlook is running, close it
oOL.Session.Logoff
oOL.Quit
End If
Set oOL = Nothing
 
Sounds good. I am embarrased to say - how do run this ? I know what
VBScript is, but no clue how to execute.

Thanks,
Scott
 
Never mind - I figured it out :)

Scott

ScottHW said:
Sounds good. I am embarrased to say - how do run this ? I know what
VBScript is, but no clue how to execute.

Thanks,
Scott

so
 
Back
Top