Link to home
Start Free TrialLog in
Avatar of nck534
nck534Flag for United States of America

asked on

Outlook Macro - Move read Messages

I need a Marco that will be able to move all read messages from my indox to another folder called read messages when I hit a certant key combination on the keyboard.   I have Outlook 2007,  I have read over many articles and blog posts on doing something similar to this but can never get it to work.  I am not that great with VBA Code to make sense of what is going on in the code I have come across to determin if it is what i need or not.  Most of the code I have come across does extra things that I do not need or is just a bit different than just a simple moving of read mail to a specific folder.

ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of nck534

ASKER

Thank you for helping me out with this,  Where in this code will I put the name of the destination folder for read messages?
Line #5.  As I mentioned in the comment I included in the code, the code assumes that the "Read Messages" folder is at the same level as the Inbox.  If the folder is at a different level, then the code on line #5 will have to be changed.
Avatar of nck534

ASKER

Works, Thank you for all of your help
You're welcome.  Glad I could help.
Avatar of nck534

ASKER

What would the code be on line #5 if the Read Messages folder was inside of the Inbox?
If "Read Messages" is a folder under the inbox, the line #5 would look like this

Set olkFolder = Session.GetDefaultFolder(olFolderInbox).Folders("Read Messages")
Avatar of nck534

ASKER

Thanks it worked.
You're welcome.