I would like to add a macro to Outlook 2007 that asks me when I shut it down if I want to turn the Out of Office Assistant on, and then asks me when I open Outlook if I want to turn Out of Office Assistant off. I've found instructions for creating the prompt at close (at Outlook 2010: How to turn Out of Office automatically on when the Outlook is closed? and http://itknowledgeexchange.techtarget.com/itanswers/automating-out-of-office/) but I don't know how to write a macro for the prompt at open.
This is the part you are interested in.
There is a note "not tested the code with Outlook 2010."
As well " CDO (Collaboration Data Objects) must be installed on the computer. If you discover that CDO is not installed, then you can download it from this Microsoft page."