More Outlook Resource Sites

Microsoft Developer Network (MSDN)

FAQs and other general resources

To add a date/time picker control to a custom form

The Outlook Appointment, Task and Journal forms include a drop-down calendar control on their main pages that allows the user to quickly pick a date. This built-in drop-down control is not available to programmers of legacy custom forms. (This is apparently one reason why certain pages on Outlook forms are not customizable.)

Among the new controls introduced to support form regions in Outlook 2007 are both date and time pickers. However, these are not designed for use on legacy forms. Using them there may cause form corruption and loss of code behind the form.

Microsoft and third-party sources provide other ActiveX controls that you may find useful in Outlook legacy custom forms. Any such control must be available on each client machine. You may find that the inconvenience of distributing the control outweighs its usefulness, especially given that text boxes bound to Outlook date/time fields support natural language entries like "tomorrow" and "next Monday" that most date pickers can't handle.

As you evaluate which control is useful for your application, you may want to ask these questions about the controls you're considering.

  • Can the control be bound to an Outlook Date/Time field?
  • Does the control support the Click event?
  • Does the control provide a way for the user to easily to set the date to None (which in Outlook is actually #1/1/4501#)?
  • Does the control support Outlook-style AutoDate entry functionality, such as "1w" for "one week from today"?

Martin Luckfiel in Germany provided these notes on using the ActiveCalendar control. They apply (more or less) to any date picker control:

  1. Add the control to the forms design Toolbox.
  2. Drag the control from the Toolbox to the custom form page.
  3. Use the Value tab of the control's Properties dialog to bind the control to the appropriate date/time field. 
  4. Set the date/time format. (ActiveCalendar seems to require a format like "10 August, 1999" for the binding to work properly.)
  5. Add code to the form's Item_Open event handler to maintain the proper size of the control. (These controls tend to resize themselves. Finding the right values for the code may take some trial and error.) Here's an example:


Publishing an Outlook form does not also install and register the ActiveX controls found on the form. You must develop your own separate mechanism for distributing, installing and registering the controls. Otherwise, users will get an error message. A package that runs with a Setup.exe or a web page with a reference to the control in a .cab file are both viable solutions. See any basic Visual Basic reference for more on distributing ActiveX controls.

ActiveX Controls


ActiveX control designed for use with Outlook forms.

CCRP Date/Time Picker

General purpose date/time picker. Free from the Common Controls Replacement Project

Microsoft Date and Time Picker

General purpose date/time picker. Included with Office 2000 Developer Edition and Visual Basic 6.0. An updated version is available in Visual Studio Service Pack 6 and later service packs.

Outlook Extensions Library

Multi-purpose add-in for Outlook developers. Supports many useful features, including ActiveX date picker control designed for use with Outlook forms.

More Information