![]() ![]() ![]() (For some reason, currentFolder.Parent in the To-Do List was causing errors.) 'This little hack prevents error if macro is run from the To-Do List. 'Exit macro if the currentFolder has a default item type of anything other than 0 (mail) Set inbox = Application.GetNamespace("MAPI").GetDefaultFolder(6) Again, see the above link for how to add macros to Outlook. Here's what the outlook macro code looks like. So what I wanted was a way for the archiving function to send messages in Inbox/Business to Mail/Business Received, but send all other messages to Mail/Personal Received. Rules move emails into a subfolder if it comes through certain accounts or matches certain criteria. This can of course be adapted to your own needs, but I thought it helpful to see what I've done to understand the code. utton.htmlīefore proceeding further, let me illustrate how my inbox and archives folders are organized. I'll start with the Outlook macro that does the actual email handling. I just also add that I tested this with Outlook 2007 and Windows Vista, though it may well work out of the box in other recent versions of Outlook. A combination of an Outlook macro (which does the actual moving of emails) and an AHK script (which calls this macro with a single keystroke) does just that. I wanted to ability to hit any key, say the 'a' key and have my message in Outlook be moved to an archive folder. Hello, I wanted to share a script that gives me something I've been wanting for a very long time. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |