|
|
Subject:
Outlook 2003 macro - move read messages from inbox
Category: Computers > Programming Asked by: and0-ga List Price: $12.00 |
Posted:
21 Sep 2006 11:43 PDT
Expires: 21 Oct 2006 11:43 PDT Question ID: 767350 |
I'm looking for a macro for Outlook 2003 that will move all read messages from my inbox to another folder. I don't want a rule that does this; I'd like something I can run by clicking a button. I've looked on a few Outlook macro sites, but can't find anything that specifically pertains to this. To sum up, I want to click a button in Outlook and have all read messages moved from my inbox to another folder. Thanks! | |
| |
| |
| |
|
|
There is no answer at this time. |
|
Subject:
Re: Outlook 2003 macro - move read messages from inbox
From: c0r3dump-ga on 18 Oct 2006 01:11 PDT |
I think this is what you need, the only change you have to do is to change the _Temp with the name of the destination folder: Sub MoveUnreadMessagesToFolder() On Error Resume Next Const olFolderInbox = 6 Set objOutlook = CreateObject("Outlook.Application") Set objNamespace = objOutlook.GetNamespace("MAPI") Set objFolderSrc = objNamespace.GetDefaultFolder(olFolderInbox) Set objFolderDst = objFolderSrc.Folders("_Temp") Set colItems = objFolderSrc.items Set colFilteredItems = colItems.Restrict("[UnRead] = False") For Each objMessage In colFilteredItems objMessage.Move objFolderDst Next End Sub I have test it in my own Outlook 2003 and seems to work fine. Hope this were what you are looking for |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |