By Debra Littlejohn Shinder, MCSE, MVP.
Outlook's custom form design features make it easy to add functionality and make Outlook a more valuable collaborative tool within your organization. This tutorial, which originally appeared on TechRepublic.com, offers a rundown of how to add controls and fields to create a customized version of any of Outlook’s default forms.
About the Author
Debra Littlejohn Shinder is a technology consultant, trainer, and writer who has authored a number of books on computer operating systems, networking, and security. These include Scene of the Cybercrime: Computer Forensics Handbook, published by Syngress, and Computer Networking Essentials, published by Cisco Press. She is also a tech editor, developmental editor, and contributor to more than fifteen additional books on subjects such as the Windows 2000 and Windows 2003 MCSE exams, CompTIA Security+ exam, and TruSecure's ICSA certification. Deb currently specializes in security issues and Microsoft products and has been awarded Microsoft’s Most Valuable Professional (MVP) status in Windows Server Security. More information on Deb Shinder.
About the Publisher
TechRepublic is an online community and information resource for IT professionals, from support staff to administrators to IT executives. Its topic-based communities engage IT pros in the ultimate peer-to-peer experience, providing action-oriented information, tools, and discussion forums to help members stay on top of technology challenges and to get their jobs done as effectively and efficiently as possible. In addition to in-depth articles and downloads on everything from Windows to messaging to firewalls, TechRepublic offers IT industry analysis, career and management tips, and a wide array of popular newsletters.
|Microsoft Office Outlook® 2003
|Microsoft Office Outlook® 2002
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.
To create the folder, go to the top level of the Folder List and create a new folder (we named it Subscriptions). 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 a folder to hold the items to be created with your new custom form.
Create the custom form
To begin creating your custom form, in the Tools menu, click Forms and select Design A Form, as shown in Figure B. Next, select a default form to modify from the Standard Forms Library. We selected the Contact form, as shown in Figure C. The default form will open in Design mode, as shown in Figure D.
Figure B: From the Tools menu, click Forms and then Design a Form to begin creating your custom form.
Figure C: Select the default form on which you want to build your custom form.
Figure D: The default form opens in Design mode.
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 select it and click 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: You can easily remove labels, controls and fields from the form by clicking on them and pressing [Delete].
To change a label, right-click 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: Add new fields to your form from the Field Chooser toolbox.
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 field 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: Drag the field you want to add from the Field Chooser onto the form.
To add a field that isn’t listed, click New 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: Use the New Field dialog box to create a field that isn’t available in the Field Chooser.
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: Drag newly created fields to your form just like the predefined ones.
You can add controls to your form by right-clicking on an empty space in the form and selecting Control Toolbox from the context menu. 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
- Command button
- Tab strip
- Scroll bar
- Spin button
Figure J: You can add controls to your form from the Controls Toolbox.
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: You can add a control, such as a checkbox, by dragging it from the Controls Toolbox.
Note that by default, when you enter text in the check box control, the text appears to the right of the control. For this example, we would like the text to appear to the left of the control. To do so, right-click the check box, click Advanced Properties, click Alignment, select 0 - Left in the drop-down list, and click Apply.
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. For more information on scripting, see the Scripting Web site on MSDN.
Making the custom form available to create new items
To make the custom form available for creating new items in your folder, you must publish the form in that folder. Optionally, you can further specify that form to be the default form 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:
- After you have created your new form, while still in the Design mode, click Forms on the Tools menu.
- Click Publish Form.
- Click Browse. In the Go to Folder dialog box, click Subscriptions and then click OK.
- Type Subscribers as the Display name for your form. This will also be the form name. Click Publish.
Note The message class will be changed to append the custom form name to the message 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.
When you publish a form to a folder, 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 in our example, select the Subscriptions folder; on the Actions menu, click New Subscribers.
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:
- Right-click the folder.
- Select Properties.
- On the General tab, in the section labeled When posting to this folder, select your custom form.
- 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 Knowledge Base article 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 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\11.0\Outlook and creating a new DWORD value named NoOutlookFormsDesigner. Set the value to 1.
Incorrectly editing the registry may severely damage your system. Before making changes to the registry, you should back up any valued data on the computer.
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.