Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specify Outlook 2010 Category Color

Status
Not open for further replies.

trevorwilliams2

Programmer
Mar 3, 2003
107
US
Based on a user selection in an Access (2010) form I am trying to change color of an Outlook email category.

Working the Outlook mailItem I am trying to do the following:

If Forms!frmTreeViewFull!TextFlagColor = "Red" Then
currentMail.Categories = olCategoryColorRed
currentMail.Save
End If

The problem is that instead of changing the category color it returns the numeric value associated with the color.

I must have the syntax off here someplace...

Any suggestions would be apreciated

 
Answer to my own question. You have to specify the category by its name / string value

Sub SetSelectionComplete()
Dim mailMsg As MailItem
For Each mailMsg In Outlook.Application.ActiveExplorer.Selection
mailMsg.Categories = "Homer Simpson"
mailMsg.Save
Next
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top