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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Outlook 2007 email categories

Status
Not open for further replies.

PortyAL

Technical User
May 13, 2005
126
GB
Hi

I have an Access database which includes code to identify e-mails in Outlook and perform various actions with them. Up to now I've used the Complete flag to identify the e-mail I wish to select:

Code:
Dim ns As Outlook.Namespace
   Dim sent As Outlook.MAPIFolder
   Dim temp As Outlook.MAPIFolder
   Dim i As Integer
   Dim j As Integer
   Dim email As MailItem
   Dim att As Attachment
   Dim emailname As String
       
   Set ns = GetNamespace("MAPI")
 
  ' Temp is a subfolder of Inbox
   Set temp = ns.GetDefaultFolder(olFolderInbox)
   
   For i = temp.Items.Count To 1 Step -1
                     
   If temp.Items(i).Class <> 43 Then GoTo nexti:
                     
   [b]If temp.Items(i).FlagStatus = olFlagComplete[/b] Then

(perform required actions)

   temp.Items(i).FlagStatus = olNoFlag

(etc.)

I now wish to use the e-mail Category color e.g. yellow, to identify the email I wish to work with. I have found the olCategoryColor property but this does not appear to work in the same way as the FlagStatus property above e.g.

Code:
If temp.Items(i).CategoryColor = olCategoryColorYellow Then

returns an Run-time error '438': Object doesn't support this property or method.

I'd therefore be grateful for any help or advice in the use of the olCategoryColor property.

Thanks

AL


I'd be grateful if anyone could help me with the use of olCategoryColor property
 
Use the Categories property of the MailItem object.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top