PocketOutlook - Categories

  • Thread starter Thread starter Karsten Baumann
  • Start date Start date
Hi Karsten,

as far as i know there is no special list. there are some language
dependent categories that pocket outlook proposes and the "user defined"
that you can enter in contact details, tasks and appointments.

if you want a list you have to walk through the contacts and collect the
strings in the categries property. if you want to get a complete list
you also have to walk through tasks and appointments.

if i am wrong - please correct me ;)

best regards,
Achim
 
Achim Bohmann said:
Hi Karsten,

as far as i know there is no special list. there are some language
dependent categories that pocket outlook proposes and the "user defined"
that you can enter in contact details, tasks and appointments.

if you want a list you have to walk through the contacts and collect the
strings in the categries property. if you want to get a complete list you
also have to walk through tasks and appointments.

if i am wrong - please correct me ;)

best regards,
Achim

Hello,

now I walk through my contacts to get a categories-list... The problem is,
when a categorie exists without a contact, task or appointment. How can I
get this categorie?

Karsten
 
Karsten,

If you use 'for each' loop to walkthough the complete contact list, you'll just get the categories that are assigned to the contacts present in the current contact folder, and you are right about it.

To get the list of all categories irrespective of whether they are presently used by some contact, task or appointment, you can use the following code.

'Create an Outlook Session
Dim newOutlookSession As New PocketOutlook.OutlookSession

'Create any contact Item from the Outlook Session
Dim aContact As PocketOutlook.Contact = newOutlookSession.Contacts.Items(0)

'Retrieve the list of categories in comma delimenated form
Dim theCategories As String = aContact.Properties(PocketOutlook.ContactProperty.FolderCategories).ToString

'Dispose the Outlook Session object
newOutlookSession.Dispose()
 
Karsten,

If you use the 'for each' loop method to walkthrough the complete contact collection, you'll just be able to retrieve the categories that are presently used by the contacts in the current contact folder, and you are right about that.

If you want to retrieve the complete list of categories irrespective of whether the category is used by some contact, task or appointment, you can use the following code snippet (I have written the VB code)


'Create an Outlook Session
Dim newOutlookSession As New PocketOutlook.OutlookSession

'Create any contact Item from the Outlook Session
Dim aContact As PocketOutlook.Contact = newOutlookSession.Contacts.Items(0)

'Retrieve the list of categories in comma delimenated form
Dim theCategories As String = aContact.Properties(PocketOutlook.ContactProperty.FolderCategories).ToString

'Dispose the Outlook Session object
newOutlookSession.Dispose()
 
Back
Top