How to remove a specific category on a selected mail in Outlook 2003 with Macro?

Posted by szekelya on Stack Overflow See other posts from Stack Overflow or by szekelya
Published on 2010-05-20T15:09:07Z Indexed on 2010/05/20 15:10 UTC
Read the original article Hit count: 239

Filed under:
|
|
|
|

Hi,

I am trying to transform my Outlook2003 into the closest thing to gmail.

I started to use categories, which are pretty similar to labels in gmail. I can assign categories automatically with rules, and I can add categories manually. I have also created "search folders", that show all mails with a given category, if they are not in the Deleted Items or Sent Items folders. This part is almost like the Label views in gmail.

Two things are missing basically, which should be done with macros (VBA to be precise) which I'm totally inexperienced with. So hence my questions:

-Can someone show me a macro to remove the category "Inbox"? That would act exactly like the Archive button in gmail. In fact I want to assign this macro to a toolbar button and call it Archive. I have a rule that adds the Inbox category to all incoming mail. As I said, I have a search folder displaying all mails categorized as Inbox, and I also have an All Mail search folder, that displays all messages regardless whether they have the Inbox category. Exactly like gmail, just the easy archiving is missing.

-Can someone show me a macro that would delete the selected mail/mails and also would remove the Inbox category before deletion? I would replace the default delete button with this macro. (Somewhat less important, as in my search folders I can filter messages that are physically placed in the Deleted Items folder, but it would be more elegant not to have mails categorized as Inbox in the trash.

Many thanks in advance,

szekelya

© Stack Overflow or respective owner

Related posts about outlook

Related posts about category