Skip navigation

Outlook: Creating a Display Field on a Custom Contact Form

Downloads
24805.zip

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.

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish