![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
what would the code be for writing a macro to auto delte emails older than 7
days? |
Ads |
#2
|
|||
|
|||
![]() Please see the sample for the Restrict function in your VBA help file. You can loop backwards through the resulting Items collection and call each item's Delete method. A backwards loop looks like this: Dim i& Dim Items as Outlook.Items Dim obj as Object For i=Items.Count to 1 Step-1 set obj=Items(i) obj.Delete Next -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook Organize eMails: http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6 Am Thu, 27 Sep 2007 14:34:00 -0700 schrieb dcallaway: what would the code be for writing a macro to auto delte emails older than 7 days? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
When deleting an email, it's so fast, it deletes the next email t. | Kathy | Outlook - General Queries | 3 | April 19th 07 11:40 PM |
Calcualting the time between email received date and reply date | Shanks | Outlook - General Queries | 3 | February 22nd 07 04:11 AM |
Deleting email | m federko | Outlook Express | 4 | August 19th 06 08:50 PM |
Simple date/time stamp macro for notes area? | c mateland | Outlook and VBA | 2 | August 1st 06 04:55 AM |
Deleting a sent email | Elizabeth | Outlook - General Queries | 4 | January 16th 06 04:17 PM |