Outlook: Creating a Display Field on a Custom Contact Form

Use this VBA script to add functionality to the form.

Sue Mosher

April 23, 2002

1 Min Read
ITPro Today logo in a gray background | ITPro Today


I want to create a display field on a custom contact form to show the most recent date that I entered a journal item for that contact. Any ideas?

Assuming that all the journal entries will reside in the Journal folder, the solution is relatively simple. The Outlook Visual Basic for Applications (VBA) code in Web Listing 1 runs whenever you create a new journal entry. (To download the code, go to http://www.exchangeadmin.com, enter 24805 in the InstantDoc ID text box, and download the 24805.zip file.) The code takes the journal item, looks up the related contact, and makes an entry in a custom field on the contact. You need to place the code in the built-in ThisOutlookSession module. Make sure that macro security is set to Medium, then restart Outlook. If you're new to Outlook VBA, you might want to first read my Windows & .NET Magazine column Outlook VBA on Demand, "Back to Basics," http://www.winnetmag.com, InstantDoc ID 21522.

If you're using a custom contact form, you should create a LastJournalDate property in the folder, add it to your form, then republish the form. If you aren't using a custom contact form, the code in Web Listing 1 adds the LastJournalDate property to the contact automatically.

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like