Outlook: how to programmatically read auto archive settings No ratings yet.

0

Auto archive is a purely Outlook feature (i.e. the settings are not stored in the mailbox), and the settings are not exposed in the object model.  The settings are stored in the registry, however, so it is possible to read the information from there.  Note though, that this is completely unsupported (just as we do not support modifying an Outlook profile in the registry).  Having said this, most of the settings have remained the same since Outlook 2003 (probably earlier, but I haven’t tested any earlier clients), and so long as you are just looking to read the settings (not set them), then this can be fairly easily done.

Most of the auto archive settings for a profile will be found in the registry key HKCU\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles\<PROFILE>\0a0d020000000000c000000000000046, where <PROFILE> is the profile name.  The values in this key are undocumented, so you’ll have to do your own investigation as to what they do (an easy way of doing this is to change your auto archive settings, and see what has changed in the registry).

Whether auto archive is enabled or not is an Outlook setting rather than a profile setting (it is either on for all profiles, or off).  By default it is on, but this can be overridden by another registry key HKCU\Software\Microsoft\Office\11.0\Outlook\Preferences\DoAging.  Note the Outlook version number – this key changes for each Outlook version, so you’ll need to update accordingly.

And finally, I wrote a sample script that will report a couple of auto archive settings.  It will report whether auto archive is enabled, and also the archive file for each profile.  It also uses the Outlook Object model to read and report the Outlook version (this is required to read the DoAging key correctly).  This script seems to work in Outlook 2003 – 2013, but you would need to do your own testing.  It is a VB script, and you will need to modify the log file location (beginning of the script) appropriate to your system.

 

autoarchive_report.vbs

0

Please rate this

Leave a Reply