Move read messages that came from specified user to a folder

Jan Sękara
Jan Sękara used Ask the Experts™
on
I want to move messages that came from notify@xyz.com and have [XYZ] in the topic to a specified folder day after they were read.

I have a code that moves... i need conditions.
I'm a noob in outlook macros :/

Please advice.

On Error Resume Next

Set objOutlook = CreateObject("Outlook.Application")
Set objNamespace = objOutlook.GetNamespace("MAPI")
Set objFolderSrc = objNamespace.GetDefaultFolder(olFolderInbox)
Set objFolderDst = objFolderSrc.Folders("@ToFile")

Set colItems = objFolderSrc.Items
Set colfiltereditems = colItems.Restrict("[UnRead] = False")

For intMessage = colfiltereditems.Count To 1 Step -1
    colfiltereditems(intMessage).Move objFolderDst
Next
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Technical Expert
Top Expert 2014
Commented:
Hi,

You can just follow the article about your concern:

http://www.freeviewer.org/blog/move-all-email-messages-in-specific-folder-in-outlook.html

Thanks & Regards
Edwin Hoffer
Edwin,

This is impossible to do with outlook rules.
Edwin HofferTechnical Expert
Top Expert 2014

Commented:
Ok, Let me research on it more then I will help you to get better solutions.....
Edwin HofferTechnical Expert
Top Expert 2014

Commented:
This is the only answer by an expert

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial