Creating a custom Outlook form is easier than you might think. You’ll begin with a template that already contains most of the functionality you’ll need. You can add and delete fields and controls. You can even use VBScript to automate specifics tasks. While creating and implementing a custom form is easy, it does require several steps and for that reason alone, can be a bit confusing. I’ll walk you through the process and even show you how to add a bit of VBScript magic.
1: Determine your needs
You’ll always begin a custom form by modifying one of the default forms shown in Figure A. Perhaps users need an updated message or journal entry form. If you’re sharing calendar data, you’ll probably start with an appointment or even a task form. You’ll have to alter the default — that’s the whole point — but the default gives you a good head start.
Base a custom form on one of the many default forms.
2: Display the Developer tab
The tools you need for customizing a form are on the Developer tab in Outlook 2010. To display this tab, click the File tab and select Options under Help. Then, click Customize Ribbon in the left pane, check Developer in the list to the right (under the Customize The Ribbon drop-down), and click OK.
3: Open a form template in design view
In step 1, you determined your task and chose an existing form to customize. Now, you’re ready to open that form in design view. To do so, click the Developer tab (step 2) and click Design A Form in the Custom Forms group. In Outlook 2007, choose Forms from the Tools menu and then choose Design A Form. The default library, the Standard Forms Library (shown in Figure A), is the right library. Select Contact and click Open. Outlook will open the default form in design view, as shown in Figure B.
You’ll begin with a default form in design view.
4: Add and change fields
You’ll start with a default form and remove what you don’t need and insert what you do. Deleting a field is easy: Select it and press [Delete]. For instance, select the Business Fax components (one at a time or hold down [Shift] as you click each) and press [Delete] to delete them. To change a field’s label text, right-click the label, choose Edit, and enter the new text. Not all fields can be changed or deleted; if the background is gray and the Field Chooser (shown in Figure B) is visible, you can edit the contents.
5: Add new fields
To add a field, choose the appropriate category from the Field Chooser drop-down and then drag a field to the form. Figure C shows two new name fields: Assistant’s Name and Manager’s Name. If the Field Chooser isn’t visible, click Field Chooser in the Tools group. If the option’s dimmed, you can’t edit (add fields) to the current page. Spend a little time familiarizing yourself with the available fields.
Drag and drop new fields onto the custom form.
6: Add a custom field
Many predefined fields are available, but you can create a custom field when necessary. To do so, click New at the bottom of the Field Chooser. Enter a name for the field, define a data type, and specify a format using the Type and Format drop-downs, respectively. Once you’ve defined the field, it will appear in the Field Chooser. Drag it to the form as you would a predefined field.
7: Add a control
Using the Control Toolbox, you can add any of the controls you’re used to working with: label, text, combo box, list box, check box, option button, toggle button, command button, and so on. If the Control Toolbox isn’t visible, right-click the form’s gray background and check Control Toolbox. Then, drag and drop a control to the form and update the label text, if necessary.
If you plan to use VBScript to program the field, click the Display tab and give the control a meaningful name you can refer to easily later. In Figure D, I’ve added a combo box and named it cboDepartment.
Rename controls (and fields) if you plan to refer to them in VBScript.
8: Add a little VBScript
It’s likely that you’ll want to enhance the new form by using VBScript. For instance, to populate the combo box with a list of departments, click View Code in the Form group to launch the Script Editor. Then, in the Script Editor window, insert the following lines:
Sub Item_Open() Set FormPage = Item.GetInspector.ModifiedFormPages("General") Set Control = FormPage.Controls("cboDepartment") Control.PossibleValues = "Administrative;Accounting;IT" End Sub
9: Publish your form
Before anyone can use the custom form, you must publish it to a library or a folder. While still in design view, click Publish in the Form group and choose Publish Form. (The Publish Form and Publish Form As options work similarly to the Save and Save As commands.) In the resulting dialog, choose Outlook Folders from the drop-down, click Browse, and select Contacts. After selecting the folder, click OK and name the form NewContactForm, as shown in Figure E. Finally, click Publish.
Designate a folder and give the custom form a name.
To use the form, go to Contacts and click the New Items option in the New group (on the Home tab) to access the custom form, as shown in Figure F. The published form, shown in Figure G, displays the new fields and the combo box populated by VBScript. In Outlook 2007, choose Forms from the Tools menu and then select Choose Form.
The custom form will be available for use as soon as you publish it.
VBScript populates the combo box you added to the new contact form.
You can also save the custom form to a library by choosing Personal Forms Library instead of Outlook Folders.
10: Make the custom form the default
When using a custom form to modify the default form, you must override the built-in default. Right-click the folder — not the Contacts shortcut, but the Contacts folder under My Contacts, as shown in Figure H. Choose Properties from the resulting context menu. On the General tab (the default), choose the custom folder from the When Posting To This Folder Use drop-down and click OK.