Saving Forms
You’ve already learned how to save a form as an Outlook Template .oft file. You can also save a form as an .fdm file, which can be installed through the Forms Manager tool.
To save a form as an .fdm file, follow these steps:
- Choose Tools, Options, then switch to the Manage Forms tab (Figure 18.6), and click the Manage Forms button to display the Forms Manager (18.7).
- If the form you want to save isn’t in the Personal Forms library, click the Set button on the right side of the Forms Manager dialog box (Figure 18.7). In the Set Library To dialog box (Figure 18.8), choose the library or folder where you can find the form you want to save, then click OK.
- In the Forms Manager dialog box, select the form you want to save, then click the Save As button.
- In the Save As dialog box, enter a file name and, if needed, change the location for the form, then click OK to finish saving it as a Form Message .fdm file.
Installing Forms
Forms that have already been compiled or saved as .fdm files (see “Saving Forms”) can be installed from the Forms Manager.
To install a form with the Forms Manager, follow these steps:
- Choose Tools, Options, then switch to the Manage Forms tab (Figure 18.6), and click the Manage Forms button to display the Forms Manager (Figure 18.7).
- Click the Set button on the right side of the Forms Manager dialog box (Figure 18.7). In the Set Library To dialog box (Figure 18.8), choose the library or folder where you can find the form you want to save, then click OK.
- In the Forms Manager dialog box, click the Install button.
- In the Open dialog box, under “Files of type,” choose “Form Message (*.fdm),” and select the .fdm file for the form you want to install.
- Click OK to complete the installation process.
TIPS AND TRICKS
The “Extending Form Design” section might lead you to think that you need to be an experienced application designer to do any useful work with Outlook forms. This is absolutely not the case. Let’s look at two very useful forms that require virtually no programming.
Using Templates for Bug Reports
Our first project is a bug-reporting form. Submitting problem reports for an application is a repetitive task because you always need to include information about your particular setup.
Figure 18.9 shows an effective form for reporting Outlook problems.
The outbug@microsoft.com address was current when this chapter was written, but may since have changed.
The Subject “Outlook:” is intended to let you add a specific problem to the title of the message.
In the body of the message, I’ve included four important pieces of information:
- The versions for Outlook, the Rules Wizard, and the Internet Mail Enhancement Patch (Minet32.dll) on my system
- Where messages are delivered — to a PST (Personal Folders file) or an Exchange Server mailbox
- Which transports are included in the list you can see by choosing Tools, Services, then switching to the Delivery tab
- A description of the problem
I’ve published this as a form in my Personal Folders library, mainly because that allows me to build a rule that puts any bug report sent with this form into my Outlook Bugs folder.
Using a Form for Report Transmissions
Our second example is a form used to send reports that go out regularly as file attachments to the same people. It combines a simple form with a tiny bit of VBScript programming code and one of the Outlook command-line switches. Here’s how to create it:
- Compose an ordinary message with the recipients, subject, and any cover note boilerplate text that you want to use.
- Choose Tools, Check Names to resolve the addresses. They should be underlined before you proceed further.
- Choose Tools, Design Outlook Form, then Form, View Code to open the Script Editor.
- In the Script Editor, type in the following code:
Function Item_Open()
Item.Send
End Function
This code causes the item to be sent as soon as it’s created.
- Choose File, Close to close the Script Editor.
- Back at the form design window, choose File, Publish Form As.
- In the Publish Form As dialog box, give the form a name, such as Send Report. This gives it a message class with the same name — for example, IPM.Note.SendReport. Publish the form in Personal Forms.
- On the desktop or in a folder, create a shortcut to Outlook.exe using the /c and /a command switches (see “Starting Outlook with Command Line Switches” in Chapter 9). The shortcut would look something like this:
"<path>\Outlook.exe" /c IPM.Note.SendReport /a
"<path>\<filename>"
where the first <path> is the path to Outlook.exe and <path>\<filename> is the path to a particular file that you want to send. Be sure to use quotation marks to enclose any paths containing spaces.
To use this shortcut, always keep the latest version of the file you want to send at the path and filename in the shortcut. Whenever you need to send it, just use the shortcut you created. The message is then created, addressed, and sent with the attachment in the blink of an eye.
SUMMARY
In this chapter, we’ve introduced some tools and techniques to build forms to organize information. After you’ve created a form, you can move it between folders and form libraries and save it as a file to distribute to other Outlook users. Some key points to remember:
- Templates (.oft files) can be used to build automated Rules Wizard replies.
- Forms can be used in Rules Wizard conditions to filter certain types of messages.
- Forms can be installed in the Personal Forms library, the Organization Forms Library (for Exchange Server users), or a folder.
- The Forms Manager is used to install forms, save them as files that can be sent to other users, copy forms between libraries and folders, and limit the space allocated for forms on your computer.