View Single Post
 
Old 10-14-2014, 03:05 AM
megatronixs megatronixs is offline Windows 7 32bit Office 2003
Advanced Beginner
 
Join Date: Aug 2012
Posts: 42
megatronixs is on a distinguished road
Default move emails to folder with a subject that is similar

Hi all,

I'm looking for some help with a outlook macro to move emails to a folder when they contain parts of the subject. They all have for sure the 2014 Report in the subject, but it could be also RE: 2014 Report. In a outlook rule I can't use wild cards, so I need it to do with VBA. So far I found the below, but I don't want to delete the email :-)

Code:
Sub CheckSpam(Item As Outlook.MailItem)
If InStr(LCase(Item.Subject), "*2014 report") Then
Item.Delete
End If
End Sub
Any Ideas how I can move this to a folder in a different mailbox.
The mailbox ix called "Mailbox - Spare"
and the folder "2014 Report"

Any help would be great.

Greetings.
Reply With Quote