Move read messages that came from specified user to a folder

Jan Sękara
Jan Sękara used Ask the Experts™
I want to move messages that came from 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
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Technical Expert
Top Expert 2014

You can just follow the article about your concern:

Thanks & Regards
Edwin Hoffer

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

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

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