Ah, I found it. The text is stored in a hidden message in the Inbox with a
MessageClass of "IPM.Note.Rules.OofTemplate.Microsoft". The text is in the
Body of that hidden message.
An Outlook 2007 StorageItem would be the equivalent of a hidden item. So
you'd get a StorageItem with that MessageClass in the Inbox. Then you'd
change the Body property of that item and save it to change the OOF text.
I gave you the property to use with Store.PropertyAccessor for the OOF
state. Just make sure that Store is an Exchange store, the property won't
exist for a public folder or PST file store.
I surely would not want to use CDO 1.21 with .NET code. It's not that it's
unsupported, most of what I do is unsupported. It's that the code may blow
up at any time for any reason and usually at a client site and no one would
be able to support you or the code or fix it.
The Outlook CDO is only client side and the MAPI libraries it depends on are
different than the ones used when Exchange or Exchange admin tools are
installed. Not compatible at all. You also can't use the server side CDO
1.21 with Outlook code at all.
--
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
"Brian Hampson" wrote in message
ups.com...
I had originally posted in microsoft.public.outlook and it was
suggested that here might be a better place. So....
======
I recently upgraded to Outlook 2007 B2TR and have found that I can no
longer code against CDO.DLL It's gone
Using C#, I used to get the MAPI session, and from that I could change
the out of office. No longer. Does anyone know how to do this using
the new Microsoft.Office.Core and Microsoft.Office.Outlook DLL's that
are supposed to be the new replacements?
Here's what I had that worked until Outlook 2007 came around:
SessionClass session = new MAPI.SessionClass();
session.Logon(Missing.Value,Missing.Value,Missing. Value,Missing.Value,Missi*ng.Value,Missing.Value,s ervertxt.Text+"\n"+mailboxtxt.Text);
session.OutOfOffice= !this.checkBoxIn.Checked;
session.OutOfOfficeText = this.OOOtxt.Text;
session.Logoff();
Any suggestions? This is s standalone app, not an add-in or other.
1. It has been brought up that the CDO is now a separate download (that
didn't help - it won't install if I have Exchange Tools on the box)
1a. Apparently CDO isn't supported - I'm getting used to that. If I
can make it work, I don't really care if it isn't supported (It appears
that much of what people ACTUALLY want to do isn't supported sigh)
2. It has been mentioned that the OOstate is available through
Store.PropertyAccessor using the new object, but the text isn't
I want to be able to change state and text of the out of office
message.
Thanks in advance for any help.
Brian Hampson
System Administrator, North America
ALS Laboratory Group