Save messages and attachments for a date range

  • Thread starter Thread starter PJFry
  • Start date Start date
P

PJFry

My company only lets us keep our e-mail in our inbox for three months, then
they are archived. Retrieving those archives requires the promise of your
first born. I am looking for code that will allow me to enter a date range
and have all the e-mails and attachments saved to my local drive as *.msg
files. I want to be able to perform this action on which ever folder is
active.

Any thoughts?

PJ
 
the active folder is Application.ActiveExplorer.CurrentFolder

Loop through the folder's Items collection, check each item's property
(ReceivedTime, CreationTime, LastModificationTime, or whatever you're
looking for), and for the matching items call the SaveAs method, which is
explained in the VBA help file.

--
Best regards
Michael Bauer - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: <http://www.vboffice.net/product.html?pub=6&lang=en>


Am Tue, 14 Apr 2009 09:42:01 -0700 schrieb PJFry:
 
The Application.ActiveExplorer.CurrentFolder was the missing piece.

Thanks!
--
Regards,

PJ
Please rate this post using the vote buttons if it was helpful.
 
Back
Top