![]() |
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
|
|||
|
|||
![]()
Hi
Can someone please tell me the VB commands to go through each folder in my mailbox, and move any item larger than a certain size (e.g. 250KB) to the folder with the same name in my archive? I frequently fill up my inbox space quota, and find physically moving large items to the archive to be time-consuming. Auto-archive only works with dates, not email size - hence why I'm asking the above question. Regards Kevin |
#2
|
|||
|
|||
![]() Kevin, there's not one single command. Loop through the Items collection of that folder with a backwards running For-Next loop, which looks like this: For i=Items.Count To 1 Step-1 .... Next In the loop check each MailItem's Size property, it tells you the size in Byte. For moving an item call its Move function and pass a variable with the target folder. That function is explained in the VBA help. -- 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, 26 Jul 2007 21:44:07 -0700 schrieb Kevin Maher: Hi Can someone please tell me the VB commands to go through each folder in my mailbox, and move any item larger than a certain size (e.g. 250KB) to the folder with the same name in my archive? I frequently fill up my inbox space quota, and find physically moving large items to the archive to be time-consuming. Auto-archive only works with dates, not email size - hence why I'm asking the above question. Regards Kevin |
#3
|
|||
|
|||
![]()
I'll give that a try. Thanks for pointing me in the right direction.
Kevin "Michael Bauer [MVP - Outlook]" wrote: Kevin, there's not one single command. Loop through the Items collection of that folder with a backwards running For-Next loop, which looks like this: For i=Items.Count To 1 Step-1 .... Next In the loop check each MailItem's Size property, it tells you the size in Byte. For moving an item call its Move function and pass a variable with the target folder. That function is explained in the VBA help. -- 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, 26 Jul 2007 21:44:07 -0700 schrieb Kevin Maher: Hi Can someone please tell me the VB commands to go through each folder in my mailbox, and move any item larger than a certain size (e.g. 250KB) to the folder with the same name in my archive? I frequently fill up my inbox space quota, and find physically moving large items to the archive to be time-consuming. Auto-archive only works with dates, not email size - hence why I'm asking the above question. Regards Kevin |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
MS Outlook 2007 slow to execute commands | Source unavailable | Outlook - Installation | 2 | June 1st 07 10:50 PM |
How do I enable the disabled commands in Outlook 2007? | Kenred | Outlook - Installation | 1 | December 10th 06 09:13 PM |
How do I get rid of the HTML commands in my messages | Shasta | Outlook - General Queries | 2 | June 4th 06 08:40 PM |
Outlook commands | [email protected] | Outlook and VBA | 10 | March 28th 06 12:41 AM |
how do Visual Basic Application (VBA) commands work | Jason | Outlook and VBA | 2 | January 10th 06 10:50 AM |