Software

Tutorial: Creating and distributing custom forms with Outlook

Outlook's collaboration features allow you to create and distribute custom forms to collect information. Walk through the steps for creating custom forms containing specified information fields.

All Outlook users are familiar with built-in forms: the message form for e-mail messages, the calendar entry forms for recording events and appointments, meeting request forms, task forms, contact forms, and so forth. But users aren't limited to these predefined forms. One of the greatest—and least utilized—of Outlook's collaboration features is the ability to create and distribute custom forms to collect information. In this tutorial, we'll walk through the steps for creating custom forms containing specified information fields.

Basing custom forms on default forms

Every type of Outlook item you can create is based on a form. The default forms (with the Message Class in parentheses) include:

  • Mail Message (IPM.Note)
  • Contact (IPM.Contact)
  • Note (IPM.StickyNote)
  • Task (IPM.Task)
  • Appointment/Event (IPM.Appointment)
  • Post (IPM.Post)
  • Distribution List (IPM.DistList)
  • Journal Entry (IPM.Activity)
  • Meeting Request (IPM.Schedule.Meeting.Request)

To build a custom form, you start with one of the default forms and modify it to suit your needs. If you're going to distribute your form via e-mail, it's easiest to build it on the default message form. If you're going to post it in a public folder, you'll probably want to build it on the Post form or—if it contains calendar-type information—you may want to build it on the Appointment/Event form or the Task form. In any case, the first step is to choose the default form that will be the basis of your new custom form.

If you can't find a default form that works for your application, you can use the Standard Default (Message Class IPM with no extension).

Creating a folder for your custom form

Since the type of folder you store it in influences the type(s) of forms you can use, you'll first want to create a folder for your form and the documents created in it. In our example, we'll create a folder called Subscribers, where we'll place entries that are created using a custom form based on the Contacts default form.

Here’s how to create the folder:

In the top level of the Folder List, create a New Folder (we named it Subscribers). In the Create New Folder dialog box, click the Folder Contains drop-down box and select the type of item based on the default form you’ll be customizing. As shown in Figure A, we selected Contact Items. Select a location for the folder and click OK.

Figure A

Create the custom form

To begin creating your custom form, pull down the Tools menu, click Forms, and select Design A Form, as shown in Figure B.

Figure B

Next, select a default form to modify from the Standard Forms Library. We selected the Contact form, as shown in Figure C.

Figure C

The default form will open in Design mode, as shown in Figure D.

Figure D

In Design mode, you can remove, add, or move labels, controls, and fields. For example, in Figure E, we have removed the Business Fax label, the down arrow for the drop-down box, and the drop-down box field. We have also removed the Mobile label and drop-down arrow and are about to remove the field. To do so, we just click it to select it and press [Delete]. You can make a field or label space larger by dragging one end when it is selected, and you can move it by clicking in the middle of it and dragging.

Figure E

To change a label, right-click on it, select Edit from the context menu, and type the new label text. You can specify new fields you want to add by selecting them from the Field Chooser toolbox (Figure F), which Outlook displays by default in Design mode.

Figure F

To add a field from the Field Chooser, click the drop-down box at the top and select a field category. For example, for the Contact form, we might choose from the following:

  • Frequently Used Fields
  • Address Fields
  • E-mail Fields
  • Fax/Other Number Fields
  • Miscellaneous Fields
  • Name Fields
  • Personal Fields
  • Phone Number Fields

(This is only a partial listing of the available field categories.)

Once you choose a category, scroll down to find the field you want and drag it to the desired spot on your form. In Figure G, we've added the Pager field to our form.

Figure G

To add a field that isn't listed, click the New button at the bottom of the Field Chooser toolbox. In the New Field dialog box, type a name for your new field (we named ours Subscriber No.). Then, in the drop-down box, select the value type (Text, Number, Percent, Currency, Yes/No, Date/Time, Duration, Keywords, Combination, Formula, Integer) to control what input will be accepted. For example, if you select Number, the user will not be allowed to enter alphabetic text into the field, only numbers. As Figure H shows, you can also further control the format of the entry. For example, you can limit the number of decimal places the number can have.

Figure H

Your new field will now appear in the Field Chooser and you can drag it to your form like the predefined fields. We've added the new fields Subscriber No. (with a Number value type) and Subscriber Type (with a Text value type) to our form in Figure I.

Figure I

You can add controls to your form by right-clicking on an empty space in the form and selecting Control Toolbox. This opens the toolbox shown in Figure J. Controls will be familiar to anyone who has worked with Visual Basic. You can choose from the following controls:

  • Label box
  • Text box
  • Combo box
  • List box
  • Check box
  • Option button
  • Toggle button
  • Frame
  • Command button
  • Tab strip
  • Multipage
  • Scroll bar
  • Spin button
  • Image

Figure J

To add a control to your form, drag the control from the Toolbox and type in any required text. In Figure K, we've added a check box to indicate whether the subscriber has chosen automatic renewal.

Figure K


Tip

If you have programming skills, you can use VBScript to further customize your forms. You can even add ActiveX controls and Web pages to your Outlook forms. Click here for more information on scripting.


Making the custom form available to create new items

You need to perform two steps to make the custom form available for creating new items in your folder:

  • Publish the form.
  • Make it the default for the folder.

Publish your custom form

You need to publish the form in the forms library or in the folder where you want to use it to create new items. Here's how:

  1. After you have created your new form, click Tools | Forms while still in Design mode.
  2. Click Publish Form.
  3. Click the Browse button to select a location.
  4. Type a Display Name for your form. This will also be the form name. Note that the Message class will be changed to append the custom form name to the class name for the default form on which it is based. For example, when we name our form Subscribers, the message class becomes IPM.Contact.Subscribers.

Publish the form to the folder if it will just be used for creating items in that folder. If you publish it in a public folder, it will be available for all users who have permission to access the folder. If you publish it in a personal folder, it's for your use only. To use the form, go to the folder and click the Actions menu; the form will be available.

Make your custom form the default for the folder

If you want your form to be the default when creating an item in the folder, follow these steps:

  1. Right-clickon the folder.
  2. Select Properties.
  3. On the General tab, in the section labeled When posting to this folder, select your custom form.
  4. Click OK.

Tip

If you want to apply the new custom form to items that are already in the folder, you’ll need to change the message class of the items in the folder. See Microsoft KB article 201087, "How to Update Existing Items in an Outlook Folder to Use a New Custom Form."


Prevent users from creating custom forms

Although custom forms have many uses, there may be times when you’ll want to prevent particular users from creating custom forms. You can do this by navigating to the registry key: HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Outlook and creating a new DWORD value named NoOutlookFormsDesigner. Set the value to 1.

Summary

The ability to create custom forms can greatly extend Outlook’s functionality for individual users and make it a more valuable collaborative tool within an organization. It’s easy to design new Outlook forms to fit your particular needs. Even if you aren’t a programmer, you can use the Forms Designer to drag and drop controls and fields to create a customized version of any of the default forms.

About

Debra Littlejohn Shinder, MCSE, MVP is a technology consultant, trainer, and writer who has authored a number of books on computer operating systems, networking, and security. Deb is a tech editor, developmental editor, and contributor to over 20 add...

0 comments

Editor's Picks