[FAQ's: OD] How do I customize an Outlook Form?
You can custom Forms inside Outlook and/or enhance the default Outlook Form actions. You can not create an Outlook Form from scratch. Also, you can not customize the Notes form.
You can hide/show tabs, add/remove controls etc. Note: when adding non-standard Outlook controls to a form be sure to test it out to make sure its compatible with Outlook or when publishing or distributing a custom form you may need to distribute any custom control used on the form too.
Step 1:
In Outlook you can go to the menu - Tools > Forms > Design a Form... > then choose a form from the "Look in:" combobox. We will base a custom form off of the Appointment Item form as seen in Fig. 1.
Fig. 1
http://vbforums.com/attachment.php?attachmentid=50366
Step 2:
Now we can start adding controls, binding to fields, and adding VB Script code. Lets make sure the control toolbox is visible and the field chooser window (Fig. 2).
Fig. 2
http://vbforums.com/attachment.php?attachmentid=50368
Step 3:
Next we will hide the first tab since we can not customize it and we will make tab P. 2 visible. With tab P.2 active we will click on the Form menu and click "Display This Page" (Fig. 3a). Then we click on tab 1 to make it active and click on the Form menu again and click "Hide This Page" (Fig. 3b).
Fig. 3
http://vbforums.com/attachment.php?attachmentid=50397 http://vbforums.com/attachment.php?attachmentid=50398
Step 4:
We will want to rename our "P.2" page to something more relevant to its proposed use. So lets rename the tab from "P.2" to "Time Entry". Make "P.2" page active by clicking on the "P.2" tab (Fig. 4a). Then click on the Form > "Rename Page..." (Fig. 4b) menu item.
Fig. 4a
http://vbforums.com/attachment.php?attachmentid=50401
Fig. 4b
http://vbforums.com/attachment.php?attachmentid=50399
Step 5:
Enter in "Time Entry" into the Rename Page dialog box and click OK (Fig. 5a). Then you will see the page rename apply (Fig. 5b).
Fig. 5a
http://vbforums.com/attachment.php?attachmentid=50400
Fig. 5b
http://vbforums.com/attachment.php?attachmentid=50402
Step 6:
Now lets add some controls on to our Form from the Control Toolbox. We will add some Buttons, Combo Boxes, Labels, and Text Boxes. When we add each control we need to decide if we want to bind a Field or use it unbound but for this example I am going to use Bound Fields from the Choose Field button on the controls property dialog window. Bound fields tell Outlook to store the data for the concerned control/form into the fields for the Form in an Outlook folder. So lets right click on a control and click Properties (Fig. 6a). Then clickthe Choose Field button on the Value tab and select a default Outlook field to bind it to like the "Start" field (Fig. 6b). If you like you can enter in a semi-colon separated values list to populate a combo box's dropdown list. The control's Property dialog window is where we can give our controls a Name, set any display formats and validation rules (if any), etc.
Fig. 6a
http://vbforums.com/attachment.php?attachmentid=50453
Fig. 6b
http://vbforums.com/attachment.php?attachmentid=50454
Step 7:
Lets add some VB Script code to our buttons. Click Form > "View Code..." menu item (Fig. 7a) and display the Script Editor. I added cde for the Save, Delete, and Close buttons (Fig. 7b).
Fig. 7a
http://vbforums.com/attachment.php?attachmentid=50510
Fig. 7b
http://vbforums.com/attachment.php?attachmentid=50511
Step 8:
Now that we added our controls lets test the Form out by previewing it or Running it. Click Form > "Run This Form" menu item (Fig. 8a) and display our completed Form (Fig. 8b).
Fig. 8a
http://vbforums.com/attachment.php?attachmentid=50456
Fig. 8b
http://vbforums.com/attachment.php?attachmentid=50458
Step 9:
Next we will want to Publish our custom Form so it can be used by to create and view items by us or others if running in an Exchange environment. See the Office Development FAQ - "How do I Publish my custom Form?" for further details.
Step 10:
After our custom Form is finished and Published we will want to set it as the default form for use in a particular folder for ease of use and viewing of items created with our Form. See the Office Development FAQ - "How do I set the Default Form for a folder?" for further details.
For even more information on Outlook Forms, see the Microsoft Knowledge Base Article:
http://support.microsoft.com/kb/q146636/