Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Out of Office (http://www.outlookbanter.com/outlook-vba/53402-out-office.html)

Noella July 26th 07 04:34 PM

Out of Office
 
Is it possible to programm Outlook to switch ON Out of Office when closing
Outlook?

Thanks


Ken Slovak - [MVP - Outlook] July 26th 07 05:02 PM

Out of Office
 
Not using the Outlook object model, unless you're running on Outlook 2007.

To set OutOfOffice you would have to set the MAPI property PR_OOF_STATE
(0x661D000B) to False. That property is located in the default Store object,
in its Fields collection.

To set the OutOfOfficeText message you would set the text in a hidden
message in the Inbox with a MessageClass of
PM.Note.Rules.OofTemplate.Microsoft. The message text is the Body of that
hidden item.

If you aren't running Outlook 2007 you'd have to access that property and
hidden item using a low level API such as CDO 1.21 or Extended MAPI (C++ or
Delphi code only) or Redemption.(www.dimastr.com/redemption).

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Noella" wrote in message
...
Is it possible to programm Outlook to switch ON Out of Office when closing
Outlook?

Thanks




All times are GMT +1. The time now is 11:27 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com