CDOLive LLC The Premier Resource for Microsoft Collaboration Data Objects             

Outlook Custom Categories Forms

This sample shows a simple way how CDO 1.21 can be used to store custom categories in a folder.

The first Microsoft Outlook form can be used to maintain the custom categories in a particular folder. When started it shows a folder picker to selected a folder:

After a folder has been selected the Outlook form displays all defined custom categories and allows to add or delete categories of your own choice:

If the categories are defined they can be saved into the folder. This will actually create a hidden CDO 1.21 message that holds all defined categories in the message body.

The second Outlook form shows how to pull those categories from this folder and displays them in the custom developed Outlook form:

Known Issues

This sample can be used only with Microsoft Outlook installed in 'Corporate or Workgroup Mode', using the MAPI provider to access Microsoft Exchange Server.

The second custom Outlook form only shows how to pull the custom categories from the hidden CDO 1.21 message. It doesn't include any code how to save the categories with the particular Outlook item and how to reload the saved categories. This will result in a custom categories list that always contain that ones stored in the folder and not that ones saved with the item.

If you want to have your custom Outlook form to display the saved categories you have to implement this by yourself.

Note that the Office/Outlook 2000 setup does not install CDO 1.21 by default. You need to run the Office/Outlook 2000 setup and add CDO 1.21 as custom option.

Prerequisites

Make sure that Microsoft Outlook is installed in Corporate or Workgroup mode and running properly. In Outlook 2000 make sure CDO 1.21 is installed.

After installing the Outlook security update this sample will stop working properly because of changes made by Microsoft. For more info on the Outlook security update please check Outlook e-mail Security Update

Checked Build

If you would like to use this sample with another language version of Microsoft Exchange Server or Microsoft Outlook, it is possible that the sample will not work without modifications. Please consult the source code for more information. This sample is build and checked for a proper function using the following environment:

  • Microsoft Windows NT Server 4.0, with Service Pack 6a, US English - international
  • Microsoft Exchange Server 5.5, with Service Pack 3, US English - international
  • Microsoft Outlook 2000, Service Release 1, US English - international
Installation and Configuration
Component Description
customcatadmin.zip (9 Kbyte) Outlook Form The Microsoft Outlook 98/200 form, which can be used to manage the custom categories in a particular folder.

Click on the Outlook form template to start it and choose 'Disable Macros' if the macro warning dialog is displayed. To publish the form to a public folder on your Microsoft Exchange Server, change to the form design mode (in Microsoft Outlook 98/2000: 'Tools', 'Forms', 'Design This Form') and publish the form to the public folder.

This form lets you manage the custom categories in a hidden CDO 1.21 message inside the public folder you have chosen when you started the form from the folder picker.
customcategories.zip (12 Kbyte) Outlook Form The Microsoft Outlook 98/2000 form to display the custom categories.

Click on the Outlook form template to start it and choose 'Disable Macros' if the macro warning dialog is displayed. To publish the form to a public folder on your Microsoft Exchange Server, change to the form design mode (in Microsoft Outlook 98/2000: 'Tools', 'Forms', 'Design This Form') and publish the form to the public folder.

This form lets displays the custom categories of the public folder it is published to. If there are no custom categories the default set (hardcoded into the form) of categories is displayed.