![]() |
Move MailItem
In VBA Outlook 2003, I simply want a macro to run and pass through a inbox
subfolder ("X"), test to see if there is an attachment. If there is, I want to move the mailitem to subfolder ("Y"). Is there a straightforward way to do this? Thanks. |
Move MailItem
You need to loop backwards through that folder's items (with a For i=Count To 1 step-1 loop). A MailItem object has an Attachments property which in turn has a Count property. If that propertie's value is 0 then call that MailItem's Move method, which is explained in the VBA help. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook Organize Outlook email: http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6 Am Wed, 20 Jun 2007 15:29:48 -0700 schrieb John Tripp: In VBA Outlook 2003, I simply want a macro to run and pass through a inbox subfolder ("X"), test to see if there is an attachment. If there is, I want to move the mailitem to subfolder ("Y"). Is there a straightforward way to do this? Thanks. |
Move MailItem
Thanks, I got it working pretty well. The problem I was having was
When I input "mailitem.move" in word 2003 I got no matches. I solved my problem by putting "mailitem.move" into word XP on a different machine. Got all the syntax and got it working. Thanks again "Michael Bauer [MVP - Outlook]" wrote: You need to loop backwards through that folder's items (with a For i=Count To 1 step-1 loop). A MailItem object has an Attachments property which in turn has a Count property. If that propertie's value is 0 then call that MailItem's Move method, which is explained in the VBA help. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook Organize Outlook email: http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6 Am Wed, 20 Jun 2007 15:29:48 -0700 schrieb John Tripp: In VBA Outlook 2003, I simply want a macro to run and pass through a inbox subfolder ("X"), test to see if there is an attachment. If there is, I want to move the mailitem to subfolder ("Y"). Is there a straightforward way to do this? Thanks. |
All times are GMT +1. The time now is 11:27 PM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com