outlookhelp
Member
- Outlook version
- Outlook 2010 32 bit
- Email Account
- IMAP
hi all
i have some code that i need a bit of help with - what i am trying to do is move emails from my Inbox to other folders based on keywords. The code i have moves an email to a folder called TEST if it contains the keyword ala in the subject line - i would like to know how i can add more keywords to the code (for example search for ala or apa or IES Pty Ltd) here is the code i have:
Sub MovePLA(Item As Outlook.MailItem)
With Item
If InStr(1, LCase(.Subject), "ala ") > 0 Then
Item.Move Session.GetDefaultFolder(olFolderInbox).Folders("TEST")
End If
End With
End Sub
Also is there any way that i can search both the subject and body of the email for those keywords?
Thanks!
Deb
i have some code that i need a bit of help with - what i am trying to do is move emails from my Inbox to other folders based on keywords. The code i have moves an email to a folder called TEST if it contains the keyword ala in the subject line - i would like to know how i can add more keywords to the code (for example search for ala or apa or IES Pty Ltd) here is the code i have:
Sub MovePLA(Item As Outlook.MailItem)
With Item
If InStr(1, LCase(.Subject), "ala ") > 0 Then
Item.Move Session.GetDefaultFolder(olFolderInbox).Folders("TEST")
End If
End With
End Sub
Also is there any way that i can search both the subject and body of the email for those keywords?
Thanks!
Deb