Delete categories on incoming e-mails

G

Guest

Outlook 2003 SP1
Everyone in our group is using different categories on their e-mails to help
sort them in areas that are meaningful to them. However, with all the 'Reply
all' and 'forwards' going on, it is getting very confusing to see new
categories or e-mails that are in categories that don't make sense. So....

What rule can I set up to automatically remove, delete, reset, the
categories of all incoming mail?
 
S

Sue Mosher [MVP-Outlook]

This is a pretty easy job for a "run a script" rule that invokes a VBA procedure. A "run a script" rule action takes a MailItem or MeetingItem as its parameter, then uses that item in the code:

Sub RunAScriptRuleRoutine(MyMail As MailItem)
Dim strID As String
Dim olNS As Outlook.NameSpace
Dim olMail As Outlook.MailItem

strID = MyMail.EntryID
Set olNS = Application.GetNamespace("MAPI")
Set olMail = olNS.GetItemFromID(strID)
' do stuff with olMail, e.g.
olMail.Calegories = ""
olMail.Save

Set olMail = Nothing
Set olNS = Nothing
End Sub

See http://www.outlookcode.com/d/code/zaphtml.htm#ol2002 for another example.


--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thanks Sue, this was helpful. But unfortunately we a couple of other
problems. We are at work, that uses an exchange server. About half of us work
offline and synchronize when we actually log-on.

There is a warning out this in the URL you provided that says:
This type of rule apparently should not be run by Exchange Server users
working
offline. See OL2002 Error Message The Message You Specified Could Not Be
Found When You Synchronize.

Also, as the script needs to reside on your PC, it would be a local rule,
correct? With all the exchange based rules we have, I don't think this is
what people want. We are really looking for a server side rule.

Linus
 
S

Sue Mosher [MVP-Outlook]

In theory it could be done with an Exchange event sink, but it's unlikely the admins would want to load the server with something scanning every message like that. If you want to pursue, ask in the microsoft.public.exchange.development forum.

What I use myself is three lines of VBA code to strip categories on all my outgoing messages.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top