Hi all,
This is a minor thing I'm working on, but I have users on my network that leave outlook open and mess up my backup of their pst files located on a network share. I wanted to make a small exe that could be put in the scheduled tasks on each workstation, just before the backup time would close outlook, if it is running.
This works when there's an existing instance of outlook running. It dies when there is not one. Is there a way to determine if the program is running or not?
Public oOutLook, cVarType,oNameSpace,oInBox
_screen.Visible = .F.
oOutLook = Getobject(,"Outlook.Application")
If ALLTRIM(Vartype(oOutLook)) == 'O'
oNameSpace = oOutLook.GetNameSpace("MAPI")
oInBox = oNameSpace.GetDefaultFolder(6)
oInbox.Display()
oOutLook.Quit()
Release oOutLook
Endif
Jim Newsom
IT Director, ICG Inc.