![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
I posted the following in the General Questions section, and then on second
thought, realized that I probably should have posted it here. Forgive the duplication. I'm running Outlook 2003 on Windows 2000. I have a scheduled task that runs a script that backs up files to an external drive every night. This works fine, except when I forget to close Outlook. If the Outlook .pst file is open, the backup script is not allowed to copy it, zip it, do anything with it. (BTW, Outlook is the only application I'm using that imposes this stricture.) My question is this: is is possible to write an Outlook macro that will instruct Outlook to close itself at a certain time of day, prior to the scheduled backup, so that my script will be allowed to back it up? Or -- just in case there should happen to be someone out there who knows something about Objject REXX, the language my backup script is written in -- is it possible to close Outlook from the script before the backup runs? Any help is appreciated. |
Ads |
#2
|
|||
|
|||
![]()
The Quit method of the Outlook.Application object can be used but not from
within an Outlook macro. -- 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 "Michael Ryle" wrote in message ... I posted the following in the General Questions section, and then on second thought, realized that I probably should have posted it here. Forgive the duplication. I'm running Outlook 2003 on Windows 2000. I have a scheduled task that runs a script that backs up files to an external drive every night. This works fine, except when I forget to close Outlook. If the Outlook .pst file is open, the backup script is not allowed to copy it, zip it, do anything with it. (BTW, Outlook is the only application I'm using that imposes this stricture.) My question is this: is is possible to write an Outlook macro that will instruct Outlook to close itself at a certain time of day, prior to the scheduled backup, so that my script will be allowed to back it up? Or -- just in case there should happen to be someone out there who knows something about Objject REXX, the language my backup script is written in -- is it possible to close Outlook from the script before the backup runs? Any help is appreciated. |
#3
|
|||
|
|||
![]()
I'm confused. If this method can't be used within a macro, i.e. VBA code,
then where is it used? What I'm looking for is simple, a piece of VBA code that is able to: 1. recognize it's a certain time of day, say 10 PM 2. based on the outcome of #1, tell Outlook to shut down so that another process can back up the .pst file Surely I'm not the only person who has run into this problem. "Ken Slovak - [MVP - Outlook]" wrote: The Quit method of the Outlook.Application object can be used but not from within an Outlook macro. -- 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 "Michael Ryle" wrote in message ... I posted the following in the General Questions section, and then on second thought, realized that I probably should have posted it here. Forgive the duplication. I'm running Outlook 2003 on Windows 2000. I have a scheduled task that runs a script that backs up files to an external drive every night. This works fine, except when I forget to close Outlook. If the Outlook .pst file is open, the backup script is not allowed to copy it, zip it, do anything with it. (BTW, Outlook is the only application I'm using that imposes this stricture.) My question is this: is is possible to write an Outlook macro that will instruct Outlook to close itself at a certain time of day, prior to the scheduled backup, so that my script will be allowed to back it up? Or -- just in case there should happen to be someone out there who knows something about Objject REXX, the language my backup script is written in -- is it possible to close Outlook from the script before the backup runs? Any help is appreciated. |
#4
|
|||
|
|||
![]()
I didn't say it can't be used, I recommended against using it within an
Outlook macro. Make up a VBS script file and call that when you want to close Outlook. Something like this: Set oOL = Nothing Set oOL = GetObject(, "Outlook.Application") If Not (oOL Is Nothing) Then oOL.Quit Set oOL = Nothing End If -- 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 "Michael Ryle" wrote in message ... I'm confused. If this method can't be used within a macro, i.e. VBA code, then where is it used? What I'm looking for is simple, a piece of VBA code that is able to: 1. recognize it's a certain time of day, say 10 PM 2. based on the outcome of #1, tell Outlook to shut down so that another process can back up the .pst file Surely I'm not the only person who has run into this problem. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How can I delete MAPI/Outlook profiles Programmatically. | news.microsoft.com | Outlook - General Queries | 3 | November 14th 06 05:52 PM |
Outlook Not Closing Down | Alan W | Outlook - Installation | 1 | July 11th 06 09:32 PM |
Programmatically change Outlook Settings | Mitchell | Outlook and VBA | 0 | June 29th 06 04:31 PM |
Closing Outlook correctly | PhilipPainter | Outlook and VBA | 3 | April 25th 06 02:50 PM |
Programmatically changing settings in Outlook 2003 | Jonathan | Add-ins for Outlook | 1 | April 7th 06 07:49 PM |