• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Resolved outlook2010 question

Saeud

New Pleskian
Hello,

I have quite a few contact groups, and I set different color categories for different contact groups. And I also set the color categories to the group members as same as their contact group color. But it seem that I need to set the color categories for the group members one by one manually.

Can outlook auto set the same contact categories to the group members when I set the color ategories for the contact group? Any way to do that?
 
Hi,

There is no such fuction in outlook to do that. But you can use VBA macro to do that. Try the codes below.

Code:
Public WithEvents objExplorer As Outlook.Explorer
Public WithEvents objContactGroup As Outlook.DistListItem
Public objCurrentFolder As Outlook.Folder

Private Sub Application_Startup()
    Set objExplorer = Outlook.Application.ActiveExplorer
End Sub

Private Sub objExplorer_Activate()
    On Error Resume Next
    If TypeOf objExplorer.Selection.Item(1) Is DistListItem Then
       Set objContactGroup = objExplorer.Selection.Item(1)
    End If
 
    Set objCurrentFolder = objExplorer.CurrentFolder
End Sub

Private Sub objContactGroup_PropertyChange(ByVal Name As String)
    Dim strCategories As String
    Dim objCurrentFolderContacts As Outlook.Items
    Dim objDefaultFolderContacts As Outlook.Items
    Dim i As Long
    Dim objMemeber As Object
    Dim strFilter As String
    Dim objFoundContact As Outlook.ContactItem
 
    If Name = "Categories" Then
       'Get the categories of the selected contact group
       strCategories = objContactGroup.Categories
 
       'Find the contacts in the current folder and default "Contacts" folder
       Set objCurrentFolderContacts = objCurrentFolder.Items.Restrict("[Email1Address]>''")
       Set objDefaultFolderContacts = Application.Session.GetDefaultFolder(olFolderContacts).Items.Restrict("[Email1Address]>''")
 
       For i = objContactGroup.MemberCount To 1 Step -1
           'Find the contacts corresponding to the group members
           Set objMember = objContactGroup.GetMember(i)
 
           strFilter = "[Email1Address] = '" & objMember.Address & "'"
           Set objFoundContact = objCurrentFolderContacts.Find(strFilter)
 
           If objFoundContact Is Nothing Then
              Set objFoundContact = objDefaultFolderContacts.Find(strFilter)
           End If
 
           'Set the same categories to the contacts
           If Not (objFoundContact Is Nothing) Then
              objFoundContact.Categories = objFoundContact.Categories & ";" & strCategories
              objFoundContact.Save
           End If
      Next
    End If
End Sub

And I also attche the artice here which you can find more detailed steps.

How to Auto Apply the Same Color Category to All Members when Categorizing a Contact Group in Outlook - Data Recovery Blog

Good luck
 
Back
Top