Save a form with the item (one-off forms)

Microsoft Office Outlook 2003

Save a form with the item (one-off forms)

When you are creating solutions using custom forms in Microsoft Outlook, it is important to understand how Outlook is using your custom form in relation to the items in a folder.

For instance, if you want to create a custom contact form to replace the default Outlook contact form, you would typically follow these steps:

  1. Start with a new, default contact item to use as the basis for your custom form.
  2. Modify the form to suit your needs.
  3. Publish the form to the Contacts folder.
  4. Set the form as the default form for the Contacts folder by changing the folder properties.

In this typical scenario, information about the form (the form definition) is not saved with each item. Instead, the form is stored in the location where it was published and is referenced using the Message Class field. This way, each item only stores the data associated with it, and its size is relatively small.

However, it is possible to have Outlook store the form definition within individual items in a folder. These items are called one-off items and will always use the form definition that is stored within the item instead of the published form.

In most situations, the form definition should not be stored within the item. The most common exception to this is a custom e-mail message form. If you are using Microsoft Exchange Server, you can publish a custom e-mail message form to the Organizational Forms Library so that it will always be available for use by everyone within the organization. In this way, you would not have to store the form definition within the item. However, if you are not using Exchange server, or if you are sending the form to another organization where the form is not available, you should select the Send form definition with item check box on the Properties page of the form when in design mode. This will ensure that the recipient will be able to view the mail message with the custom form.

Note  If the recipient is still unable to view your custom form, be sure that you customized or disabled the Read page of the custom e-mail form.

If the custom form contains Microsoft Visual Basic Scripting Edition (VBScript), Outlook will display the macro virus warning unless the form is published in the Microsoft Exchange Server Organizational Forms Library.

The following scenarios commonly result in items becoming one-off items.

  • You have a folder-based solution whereby the form is published in the folder and the items are using the published form. You open an existing item in a folder, make changes to the form in design mode, and then save the item.

    Because the form definition has changed and the form was not republished, Outlook will save the new form definition with the item. If you want to change the form for all of the items in the folder, instead of opening an existing item, follow these steps:

    1. Open a new item based on your custom form.
    2. Make form design changes to that item.
    3. Republish the form with the same name.
    4. Close and do not save changes to the item.

    All of the items in the folder will now use the updated custom form the next time the items are opened, because the message class of the items still refers to the published form.

  • VBScript code in the custom form changed the form definition of the item.

    If VBScript code within an item programmatically changes the form, in many cases this will result in the form definition being saved with the item. The following Outlook object model methods most commonly cause this behavior:

Although solutions and situations vary greatly, there are some signs you should be aware of that can indicate that an item has become a one-off item.

  • VBScript code in the form does not run, or a macro virus warning unexpectedly appears, indicating that the item itself, and not just a published form, contains VBScript code.
  • The size of an item increases unexpectedly.
  • An item’s icon changes unexpectedly.