Tutorial 4. Custom Forms
Note. In order to make full use of this tutorial, it is essential to first install Blueprint for Outlook. Further details can be found on the 'Download' page
To explain the concepts with this tutorial, the following blueprint template example will be referenced: MESSAGE_CUSTOMFORM.htm
In this tutorial, we will explain how to use Blueprint for Outlook to support your custom forms. This tutorial assumes a basic understanding of the use of custom forms within Outlook.
This tutorial will explain how to use the following features:
1. The Blueprint Custom Form Example
2. Creating the Blueprint Template
3. Configuring Blueprint to use the template
1. The Blueprint Custom Form Example
Blueprint for Outlook installs with an example custom form to help guide you through creating your own Blueprint templates for custom forms. This can be located under the following path:
[Program Files]\Savvisoft\Blueprint for Outlook\Templates\Forms\CustomForm.oft
Open the custom form and view the compose page. The form provides basic Outlook fields, such as To, Cc, Subject, and Message body. In addition, the Outlook MailItem 'Categories' property is also present. The form also includes a number of custom user properties:
| User Property Name | Comments |
| MyText | TextBox providing some simple text |
| MyComboText | ComboBox which provides a choice of text( e.g. Unclassified, Restricted, Confidential, Secret, Top Secret) |
| MyComboValue | ComboBox which provides a choice of number (e.g. 1,2,3,4) |
| MyDate | Date Control providing a date and time |
| MyCheckBox | Check Box providing a Yes/No value |
The compose page of the example Blueprint custom form
2. Creating the Blueprint Template
The Blueprint template,
MESSAGE_CUSTOMFORM.htm provides an example of how to construct your template to work a custom form. This section assumes that you are now familiar with Blueprint templates, and general layout. If you are not, please visit the earlier tutorials. This template is similar to the Header/Fotter template described in the previous tutorial. In addition, the definition of the custom properties have been included.
To define a user property, the NAME property within the Named arguments must refer to the name of the Outlook User Property. However, to inform Blueprint to manage this property as a custom user property, the named argument, 'PROP_TYPE=USER' must be included.
<DIV>NAME=MyText|PROP_TYPE=USER</DIV>
Note. The USER type is used to access the UserProperties collection on the Outlook Object Model item. On Microsoft Outlook 2002-2007, it is also possible to use the ITEM type, which provides access to the ItemProperties collection. The UserProperties can be accessed through the ItemProperties. See the Technical Reference page for more information.
The following describes the changes to the template to support the custom User Properties on the Blueprint template.
MyComboText
The ComboText value has been added to the Header of the message. It includes the UPPER_CASE named argument to present the text from the property in upper case.
NAME=MyComboText|PROP_TYPE=USER|HIDE_ROW_IF_EMPTY|UPPER_CASE
MyText
The MyText text is presented in the general property section, and will be presented as is.
MyComboValue
The MyComboValue number is presented in the general property section. It provides examples of presenting the numeric value directly, and including support for the POSSIBLE_VALUES processing to display the numeric value as some defined text:
<TR>
<TD>My Combo Value as number:</TD>
<TD id="BPMessProp">NAME=MyComboValue|PROP_TYPE=USER|HIDE_ROW_IF_EMPTY</TD>
</TR>
<TR>
<TD>My Combo Value as text:</TD>
<TD id="BPMessProp">NAME=MyComboValue|PROP_TYPE=USER|HIDE_ROW_IF_EMPTY|POSSIBLE_VALUES=0: ,1:One,2:Two,3:Three,4:Four</TD>
</TR>
|
MyDate
The MyDate value is of type time/date. Therefore, Blueprint will present the date in the standard format.
MyCheckBox
The MyCheckBox value is managed through a Yes/No Property type. The value that is generated for Blueprint is either 0/1. Therefore, in order to present a more accurate description on the printed page, it is necessary to use the POSSIBLE_VALUES argument. This therefore allows you to control exactly what to present (e.g. Yes/No, True/False, On/Off). In this case, the template will show Yes or No.
NAME=MyCheckBox|PROP_TYPE=USER|HIDE_ROW_IF_EMPTY|POSSIBLE_VALUES=1:Yes,0:No
1. Configuring Blueprint to use the template
Before Blueprint will print this type of message, it is first necessary to configure Blueprint for Outlook to associate the message class of the custom form with the template of your choice. The message class of the Blueprint custom form is "IPM.Note.Blueprint". For more information on how to configure Blueprint, see
Using Blueprint for Outlook. Follow the dialogs, and specify the custom message class.
Therefore, when configured, and the message is printed, it looks like this:
The Blueprint preview of the custom form based message.
Summary
This tutorial has provided details of how to design and configure a Blueprint template to work with your custom form. It demonstrated, through the Bluprint example custom form, how to manage Outlook User Properties within the template.
Continue to Tutorial 5: Creating Multi Item Styles