Backing up Outlook files

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Are there any API calls to make Outlook temporarily release *.pst and other
files so that they can be backed up?

Thanks,

-Peter
 
Hi Peter,

call Application.Quit. If no-one else is keeping a reference on it OL
will close, except when a modal dialog is showing.
 
Note that I'm not running from "inside" Outlook, this is a completely
independent backup application that needs to be able to back up Outlook.

Thanks,

Peter
 
Hi Peter,

do you have access to the code of that backup application?

That the application is independent from Ol doesn´t matter, you can get
a reference on OL and close it excepting
- there are more references on it,
- a modal dialog is displaying,
- you´re working on an item. OL will prompt you for save the item. You
can cancel and OL remains opened.

You could display a dialog to the user and ask her/him for closing OL.
 
Yes, I do, since I'm writing it. You wouldn't happento have an example of how
to get a reference to OL?

Thanks,

Peter
 
on error resume next
dim oApp as outlook.application
set oapp=getobject(,"outlook.application")
if not oapp is nothing then
oapp.quit
set oapp=nothing
' maybe wait a few ms
set oapp=getobject(,"outlook.application")
if not oapp is nothing then
' OL is sill running
endif
endif
 
We're getting very close to what I need now, except I would rather not have
to call a script, it would be better if I could do this directly from my C++
code. But I can't find an equivalent method to call from C++ in the MSDN
library.

Thanks,

Peter
 
Back
Top