VBA script to move email messages (archive)

July 22, 2010 at 02:46:36
Specs: Windows XP
Hi all,

I am currently having to use Outlook 2003 on Win XP at work and I am desperately looking for help with some basic archiving functionality that I used to have before my company went and messed with my world :-(

My employer has obtained a third party add-on email archiving system as part of its corporate "records management" strategy.

Among other things, this archiving system replaces (makes unavailable actually) the standard archiving functionality in Outlook 2003 client (the normally standard Archive menu item shows as “Disabled by your system administrator” in the File menu for instance).

This new archiving system will archive all items older than 90 days and put them into a similarly named folder which is actually on a remote archiving server. This folder is visible under my mailbox root and is called EV (short for Enterprise Vault). In fact there are a number of sub-folders under this EV folder that pertain to a number of years that the contents will be retained – yes, this system is a document retention system primarily. These sub folders are named like 001 Year or 003 years or 010 years etc.

My beef is that I get so much email that my email quota is exceeded in about three weeks so I want to be able to archive all items older than say 21 days into a folder of the same name which will reside under one of the sub folders I mentioned above. In this case, I want to use the “010 Years” sub folder to archive everything to.

So the logic could perhaps be:

Search through all emails in all sub-folders of the mailbox (except the EV folder and any folders in PST files).
If an email was received 21 days or more ago, move the email to a folder of the same name beneath the Mailbox->EV folder while respecting any folder hierarchy.

i.e. if an email received 22 days ago is found in the folder Mailbox->Finance->Monthly Stuff then it should be moved to exist in the folder Mailbox->EV->010 Years->Finance->Monthly Stuff .

Do this until all folders have been looked into and all messages meeting the age criteria have been located and moved.

Truth be told, I can only just about spell vba so I really need your help.

Can anyone donate some VBA to achieve the above?

Thanks VERY much!!!

See More: VBA script to move email messages (archive)

July 27, 2010 at 20:14:34
OK - In lieu of *any* replies, I have purchased some "programming Outlook" books (including two of Sue's).

So suffice to say, I may not fix my problem but I will be armed and extremely dangerous... (for a while at least).

I would still appreciate hearing the *right* way to this :-)


Report •
Related Solutions

Ask Question