A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

script to clear out categories on incoming emails



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old July 28th 06, 06:07 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
 
Posts: 435
Default script to clear out categories on incoming emails

Am 27 Jul 2006 13:37:22 -0700 schrieb :

Did you write that code into the module "ThisOutlookSession"? Additionally,
the security setting must be medium at least to allow scripts, then please
restart Outlook.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
--
www.VBOffice.net --


I use categories to sort emails (and rules to automatically assign
categories to incoming email), and have custom search folders to
display emails from each category. For those emails that I haven't
assigned a category yet, I have a search folder that looks for emails
with no category. This works great...unless other people have rules on
outgoing email to assign categories that I don't have.

Unfortunately, I can't create a search folder who's filter is "Category
my_category 1 OR my_category2", etc. So, I want to create a
script-driven rule that first removes all categories on incoming email,
then I can let my other rules run to assign my categories.

I am an absolute Outlook macro beginner, but cobbled together the
following code from samples in this group and other websites...
(this is just test code to see if I can manipulate the categories
correctly)

Sub test2(Item As Outlook.MailItem)
MsgBox "Mail message arrived: " & Item.Subject
Item.Categories = "Greg"
Item.Save

End Sub

I have a rule to run this script first on every incoming email.
However, it doesn't appear to work - I don't even get the msgBox (a
test line), let along the test category assignment. Can someone help?

Thanks

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Graphics in incoming emails are suppressed Big Al-Bob Outlook Express 2 July 15th 06 10:35 PM
Receive multi-copies of incoming emails? wendystation Outlook - Using Contacts 9 May 3rd 06 02:27 PM
How do I clear deleted emails from my inbox for good? Ryan Outlook - General Queries 1 May 3rd 06 12:30 AM
Assigning Categories to Emails Keith Brown Outlook and VBA 1 February 15th 06 02:42 PM
How do I get incoming emails without the side arrows Kate at work Outlook - General Queries 0 February 9th 06 03:32 AM


All times are GMT +1. The time now is 05:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.