Creating a unique indicator for each Outlook 2003 task

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to be able to automatically create a permanent and unique id
each time I create a new Outlook 2003 task. If it does this automatically,
then I would like to be able to display it.
 
This is functionality you can add with a custom form or VBA code.

If a simple unique identifier will do, you can take the item's EntryID (set after the item is saved) and copy it into the field that you want to use to hold the ID. The value of the actual EntryID property may change if you move the item, but the value in the custom property won't.

My book demonstrates several other methods. You can download the sample code from http://www.outlookcode.com/member/book.aspx :

1) Get a GUID with the Session.CreateConversationIndex from CDO 1.21. (Listing 20.5)

2) Build an ID from the current date/time (Listing 20.6)

If you need a sequential number, not just a unique number, here are some methods you can use:

3) Use an autonumber table in SQL Server or Microsoft Access. (In my book, Listing 23.7 with Listing 23.4 or 23.3 to open the database)

4) In a custom Outlook form, republish the form after each use to reset the number. See http://www.outlookexchange.com/articles/ricardosilva/vbscriptoutforms.asp

5) Use an Excel worksheet that contains VBA code to increment the number. See http://www.microsoft.com/office/com...sers&mid=5489e140-9794-41b7-a9ba-1324e136ff3a



--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Hi Sue,

Thanks for the tip,and I'm researching several of your suggestions. I
haven't been able to find the EntryID field that you mentioned. Can you
provide any additional details on this one?

Thanks!!
 
It's a property on all Outlook items, set when the item is first saved. When in doubt, check the object browser: Press ALt+F11 to open the VBA environment in Outlook, then press F2. Switch from <All Libraries> to Outlook to browse all Outlook objects and their properties, methods, and events. Select any object or member, then press F1 to see its Help topic.
--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top