This page has been archived and is no longer  being actively maintained.
Outlook Developer Home
Outlook Programmer's Library
 
Outlook Technologies
Outlook Forms
Languages
Samples
Other Technologies

 

To add a date/time picker control to an Outlook form

For the current version of this page, click here.

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. (This is apparently one reason why certain pages on Outlook forms are not customizable.) However, both Microsoft and third-party sources provide other ActiveX controls that you can use in your custom forms.

ActiveX Controls | Usage | Distribution | Notes | More Information

ActiveX Controls

ActiveCalendar 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.
Back to Top

Usage

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:

Back to Top

Distribution

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.
Back to Top

Notes

The general purpose date/time pickers may not support the specific needs of Outlook programmers. 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"?
Back to Top

More Information

   
© 2002-6 TurtleFlock, LLC
All right reserved.
About OutlookCode.com

Send comments to webmaster@outlookcode.com

Designed and Implemented by TerraLink USA 

FrontPage Integration
by RobsonDesignWorks

 
 
get Sue's code | forums | share your own code | registration