Hello, friends. I'm trying to adapt this code (From user Graham Mayor) for using in a different Mail Inbox named "workgroup" but I don't get it. I don't know if is necessary to replace entire name "myinbox" or create other route.

In adiccion, I'm trying to categorize my eMails with a blue color, but at the moment I only got it put a name "Susi".
someone for helping me? thanks in advance!

Public Sub NewInbox_Su ()

'original code from Graham Mayor www.gmayor.com

Dim myNameSpace As Outlook.NameSpace

Dim myInbox As Outlook.Folder 'Here is my first doubt, I don't know how to refer other Inbox

Dim myItem As MailItem

Dim lngCount As Long



Set myNameSpace = Application.GetNamespace("MAPI")

Set myInbox = myNameSpace.GetDefaultFolder(olFolderInbox)

MsgBox myInbox.UnReadItemCount

If myInbox.UnReadItemCount > 0 Then

For lngCount = myInbox.Items.Count To 1 Step -1



If TypeName(myInbox.Items(lngCount)) = "MailItem" Then

If myInbox.Items(lngCount).UnRead = True Then

Set myItem = myInbox.Items(lngCount)

If InStr(LCase(myItem.Body), "alarm") > 0 Or _

InStr(LCase(myItem.Subject), "urgent") > 0 Then

myItem.Categories = "Susi" 'Here is my second doubt, I don't know how to put a blue color
myItem.Save
myiTem.Unread = False

End If

End If

End If

DoEvents



Next lngCount

End If

Set myNameSpace = Nothing

Set myInbox = Nothing

Set myItem = Nothing


End Sub