Category List

Status
Not open for further replies.

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
No, not yet. Waiting to see what my experts have to say.
 

LMS

Senior Member
Outlook version
Email Account
Exchange Server
Any chance of an update? Would love to do things through the categories showing the contacts from all folders and subfolders to a specific category. Thanks to the Smart Woman!!!!!!;)
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
No word yet on how to do it - and I have no idea, so I'm not smart enough. :)
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Nah... used up my smartness on the other question. :) You can use LBound(strContact) To UBound(strContact) to create an array but I'm not sure its going to be workable.
 

LMS

Senior Member
Outlook version
Email Account
Exchange Server
Here is the code that shows two folders etc.....but what do is change per what you wrote please?Private Sub ddlCategories_Change()
Dim objOutlook As outlook.Application
Dim objNS As outlook.NameSpace
Dim objFolder As outlook.MAPIFolder
Dim objFolder2 As outlook.MAPIFolder
Dim objFolder3 As outlook.MAPIFolder
Dim ctc As ContactItem
Dim Category As String

Set objOutlook = CreateObject("Outlook.Application")
Set objFolder2 = objOutlook.Session.GetDefaultFolder(OlDefaultFolders.olFolderContacts).Folders("Test")
Set objFolder3 = objOutlook.Session.GetDefaultFolder(OlDefaultFolders.olFolderContacts).Folders("Family")
Set objFolder = objFolder3
Category = Me.ddlCategories.Text

Me.ddlContacts.Clear

For Each ctc In objFolder.items
If ctc.Categories = Category Then
Me.ddlContacts.AddItem ctc.FullName
End If
Next


End Sub

Private Sub UserForm_Initialize()
Dim Category
For Each Category In Application.Session.Categories
Me.ddlCategories.AddItem Category
Next

End Sub
 

LMS

Senior Member
Outlook version
Email Account
Exchange Server
Any possible update? See above.

- - - Updated - - -

Any possible update? See above.

- - - Updated - - -

Any possible update? See above.

- - - Updated - - -

Any possible update? See above.
 

LMS

Senior Member
Outlook version
Email Account
Exchange Server
In using the following code referencing a subfolder, if there is a subfolder of the subfolder, what do i add to reference the subfolder of the subfolder. The subfolder of Family is Cousins

Set objFolder3 = objOutlook.Session.GetDefaultFolder(OlDefaultFolde rs.olFolderContacts).Folders("Family")
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Just add another .folders("foldername") to the end.
 

LMS

Senior Member
Outlook version
Email Account
Exchange Server
thanks....i figured out how to make sure that goes to the sub-subfolder ...and it does....but the code I was given to show the contact name from a subfolder, does not refer to a sub-subfolder....so here is the words I added that got me to the contact names in the subfolders.....so what can I change so it does it for the sub-subfolders as well ....please!!!!
For Each subFolder In objOutlook.Session.GetDefaultFolder(OlDefaultFolders.olFolderContacts).Folders
addItem subFolder, Category
Next

End Sub

Private Sub addItem(subFolder, categoriesName As String)
For Each ctc In subFolder.items
If ctc.Categories = categoriesName Then
Me.ddlContacts.addItem ctc.FullName
End If
Next
End Sub
 

LMS

Senior Member
Outlook version
Email Account
Exchange Server
The first subfolder of the Contacts, is "Test" and the two subfolders of the subfolder "Test" are "SubTest" and "SubTest2"

I added following code line that then shows the contact names of the contacts in the SubTest and SubTest2 and it works but it is only related to the subfolders of the subfolder "Test"

So is there as a quick to change the following so it takes care of all subfolders from all subfolders instead just from one subfolder called "Test"

For Each subFolder In objOutlook.Session.GetDefaultFolder(OlDefaultFolders.olFolderContacts).Folders("Test").Folders
addItem subFolder, Category
Next
 

LMS

Senior Member
Outlook version
Email Account
Exchange Server
Thanks very much...but I am not the SMART WOMAN!;););) Can write down what and where to put it to try it???? And anything I need to change or delete.
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
You need to go through each contact in each folder and create a string. In looking at that code again and your macro, I'm not sure it will do what you want, except maybe for this part -

You'll need to do something like

For each olContact Contact
strList = chr(34) & fullname & chr(34) & "," & strList

Next

loop through all folders. It's really not a good way as its going to be slow as you need to read all contacts.
 

LMS

Senior Member
Outlook version
Email Account
Exchange Server
Where do I put this And if this is added to the Userform code, is there anything to delete from my first code?
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
J Outlook Rules not show Master Category List Using Outlook.com accounts in Outlook 4
M Searching for categories not in the master category list Using Outlook 3
R Restore Master Category List Outlook 2013 Using Outlook 7
K Master Category List / Contacts Public Folder Advice Using Outlook 4
L Anyway to Display entire category list in Outlook 2007 automatically? Using Outlook 1
P Emails assigned with a certain category (within a shared inbox) to be copied to a specific folder. Outlook VBA and Custom Forms 2
R Clear one category when another is chosen Outlook VBA and Custom Forms 1
A VBA Script - Print Date between first email in Category X and last email in Category Y Outlook VBA and Custom Forms 3
R Auto Assign Category colours to Incoming Emails based on whom the email is addressed Outlook VBA and Custom Forms 3
A Unflag Inbox and Flag Inbox with Orange Category After Item is send Outlook VBA and Custom Forms 3
bhamberg Contacts in a category Outlook VBA and Custom Forms 11
K Custom Category Colors Using Outlook 2
4 Macro to set the category of Deleted Item? Outlook VBA and Custom Forms 2
K Update Appointment category when changed in Excel Using Outlook 3
soadfan assign category (VBA) Using Outlook 7
J Automatic color category according to variable domains Outlook VBA and Custom Forms 4
Diane Poremsky Category Color doesn't Display in Inbox Using Outlook 0
Wolfkc Unwanted Category "Starred in Android" Using Outlook 6
M receive mail when appointment category changes and create task from appointment Outlook VBA and Custom Forms 0
N VBA Outlook reference to Excel and assigning category Outlook VBA and Custom Forms 13
A recover contact category assignments Using Outlook 4
A Grouping emails using "From" causes a None Category Using Outlook 5
William getting custom form to load category colors Outlook VBA and Custom Forms 4
Diane Poremsky Categorize Messages using Contact Category Using Outlook 0
T Macro to find contacts by category and copy them to another folder Outlook VBA and Custom Forms 15
bifjamod Saving sent email to specific folder based on category with wildcard Outlook VBA and Custom Forms 1
K Outlook 2010 - Set the category based on category of other emails in same conversatio Using Outlook 20
A How are you handling Outlook.com category issue and syncing Using Outlook.com accounts in Outlook 2
T default category Outlook VBA and Custom Forms 2
R click to toggle quick click category reasigns to where ? Using Outlook 2
L Change Category in a Task via macro Using Outlook 8
K Help! I selected every contact and mistakenly made them all the same category Using Outlook 1
R Filter Views by Category Using Outlook 2
S categories are being cut off after selecting from category pop up form Using Outlook 3
D Search on Category in Outlook 2013 Using Outlook 1
R Any idea why my category colours aren't showing in my calendar? Using Outlook 0
F Export Outlook contacts by One Category Using Outlook 1
M Cannot change category in inbox; Can change it in popup Using Outlook 0
D Macro to export mail data based on assigned category Using Outlook 3
C Custom form with custom colour category visible to all users in public folders Using Outlook 1
J Contacts: Assigning followup date by category Using Outlook 2
C Apply Category Color for Appointment Background Color Using Outlook 2
J Calendar Search by Category not showing expected results Using Outlook 7
S Printing Category Key on Calendar Using Outlook 1
A Can Rule Check Category Contact is assigned? Using Outlook 1
J View All Category Items Using Outlook 1
R Duplicating Category Colors For Second User Using Outlook 1
C Contact Custom Form - Category View Using Outlook 3
J Default Category foo Calendar Appointments Using Outlook 1
D Assistance to create a mac that can move a msg based on category to spec fldr Using Outlook 1

Similar threads

Top