This page has been archived and is no longer  being actively maintained.
Outlook Developer Home
Outlook Programmer's Library
 
Outlook Technologies
Outlook Forms
Languages
Samples
Other Technologies

 

Saving and Publishing Outlook Forms

For the current version of this page, click here.

When you design a form in Outlook, you have three choices for saving it: 
  • File | Save -- This saves the item (i.e. the data record) and in an Outlook folder. If the form is a one-off, it will be embedded in the item.
  • File | Save As -- This saves the form as an Outlook template .oft file. Use this technique to back up your forms. 
  • Tools | Forms | Publish Form -- This puts the form in the forms library you indicate. 

Publishing forms offer several advantages: 

  • In secure versions of Outlook, only code on published forms runs.
  • In earlier versions of Outlook, users of unpublished forms that contain code will get an Enable/Disable Macros prompt.
  • In Outlook 2003, code on published forms does not generate security prompts.
  • The default setting in Outlook 2003 is to allow only published forms to run ActiveX controls that don't ship with Outlook.
  • For items created with published forms, the form definition is not normally stored with the item. This means that if you have 5kb worth of data and 200kb worth of form design, items created with your form are 5kb in size, not 205kb. 

The main use of forms templates is to make backup copies of published forms and to share forms with other Outlook users outside your organization. See To distribute Microsoft Outlook forms to other users

In general, you should not publish the same form in different forms libraries using the same name for the form. Doing so is likely to cause forms cache corruption. If you want to make a backup, either save as an .oft file or publish under a different name. 

Forms Libraries | Creating an Organization Forms Library | Running Forms | One-off Forms | Notes | More Information

Forms Libraries

When you publish a form, you store it in a particular forms library. There are three types of Outlook forms libraries:
Form Type Purpose
Organizational Forms Forms for enterprise-wide use
Personal Forms Forms for your personal use
Folder libraries Forms for use with a particular folder, often a public folder

Users will also see a Standard or Application Forms library. This is the built-in library of Outlook forms. You cannot publish custom forms to it. 

Message forms must be published to the Organizational Forms or Personal Forms library, not to a folder library.  Forms for use with items in a folder are usually published to the folder. See:

If you create a form, publish it to the Personal Forms library, and then later make modifications and publish it to the Organization Forms library, you still have the copy in the Personal Forms library. Outlook always looks in Personal Forms first, so it will find the old copy, rather than the newer one in Organization Forms. You need to use the Forms Manager to remove the old copy from the Personal Forms library. To get to the Forms Manager in Outlook 97, choose Tools | Options | Manage Forms | Manage Forms. In Outlook 98 and Outlook 2000 Corporate/Workgroup mode, use Tools | Options | Other | Advanced Options | Custom Forms | Manage Forms. Outlook 98 and Outlook 2000 in Internet Mail Only mode do not support the Forms Manager.

Back to Top

Creating an Organization Forms Library

Microsoft Exchange Server supports a centralized forms library -- Organization Forms.

In Exchange 4.x and 5.x, you find the Organization Forms library in the Microsoft Exchange Administrator program under Folders/System Folders/EFORMS REGISTRY. Use Tools | Forms Administrator to add a library or to expand the list of available forms to include forms in different languages. Outlook automatically checks the language version of an Outlook client and tries to use a form from that language Organization Forms library. 

For Exchange 2000 and 2003, see XADM How to Create Organizational Forms Library in Exchange. To change permissions on the Exchange 2000 Organization Forms library, in the Exchange System Manager program, under Folders, right-click Public Folders, and choose Show System Folders. You should then be able to bring up the properties for the EFORMS REGISTRY\Organization Forms folder and set the Client Permissions on the Permissions tab. To publish a form, you'll need at least the right to create items. Granting Author permission will let key users add new forms and also modify and delete the ones they've added.

You can't publish forms to the Organization Forms library unless the systems administrator grants you permission. You can always publish to the Personal Forms library, which is stored in your Exchange Server mailbox, because the Personal Forms library is yours. 

Publishing forms to a public folder also involves permissions. You must be the owner of a folder to publish forms to that folder.

Also see:

Back to Top

Running Forms

Users can run forms and templates several ways:
  • In Outlook 97, use the Compose | Choose Form or Compose | Choose Template command.
  • In later versions, choose Tools | Forms | Choose Form. The user can choose from both templates and forms in a Choose Form dialog box.
  • For forms published in folders, choose the form name from the Actions menu.
  • For forms designated the default for a folder, click the New button for the folder

See To launch a custom Outlook form for methods that involve adding a toolbar button or programming code.

  Back to Top

One-off Forms

If the form or template has Visual Basic Script (VBScript) code behind it and if you store the form as an .oft template file or an Outlook item, instead of publishing the form, users of Outlook 97, Outlook 98, and Outlook 2000 (pre-SP2) will see an Enable/Disable Macros dialog box each time they use the template or item. This dialog box doesn't appear for published forms. Outlook assumes that, when you publish a form, you know that the content is safe to run. See:

In Outlook 2000 SP2 and later versions, the users gets no enable/disable macros prompt, and code simply does not run. In Outlook 2002 SP3 and 2003, users may get an error message when a form tries to load an ActiveX control.

If code on a received message or saved item doesn't run or if users see the Enable/Disable Macros prompt for a published form, it means that the form is "one-offed," in other words that the form definition is now saved with the item, rather than the item using a published form. Other symptoms for one-off form items are an increase in the size of the item and loss of the custom icon for the item.

Recommended practice is to set up your form so that it will notify users of any one-off situation:

  • Use a label control on a custom page to display warning text such as, "This form is not fully functional. You must first publish it using the Tools | Forms | Publish Form command. If you have already published it, contact xxx@domain.dom for additional instructions."
  • Hide each page of the form except the custom page with the warning text.
  • Include script in the form's Item_Open event handler to show all of the actual working pages and hide the warning page using the Inspector.ShowFormPage and .HideFormPage methods.

Checking the Send form definition with item box on the (Properties) page of the form will definitely produce a one-off item. Other causes of one-off form items usually are related to changing the form design in code. See: 

In Outlook 2002 or 2003, if you forward a custom message form whose Forward action is set to the IPM.Note form, the resulting item will include the form definition of the custom form, but will be one-offed. The problem does not seem to affect earlier versions. The solution is to edit the Forward action on the (Actions) tab to point to the custom message form instead of IPM.Note.

Office 2000 Service Pack 2 fixes several one-off form problems, but also includes the Outlook E-mail Security Update.

To clean up existing one-off items, use CDO 1.21 to remove MAPI property tags that are apparently responsible for the one-off behavior, as shown in the CleanUpItems sample, and set the Type property (CDO's equivalent of MessageClass in the OOM) to your published custom form.

Back to Top

Notes

If you make changes to a published form, increment the version number on the (Properties) tab. This will make it easier to tell whether the latest version of your form is loading. You can check the version number on an item using a custom form by looking at Help | About This Form.  

Custom forms are stored as hidden messages in the folder (for forms published to a folder) or at the top level of the user's mailbox or Personal Folders file (for forms published to the Personal Forms library).  You can see them and delete them with Outlook Spy.

Outlook 2002 can display a maximum of 19 forms on a folder's Actions menu.

Back to Top

More Information

   
© 2002-6 TurtleFlock, LLC
All right reserved.
About OutlookCode.com

Send comments to webmaster@outlookcode.com

Designed and Implemented by TerraLink USA 

FrontPage Integration
by RobsonDesignWorks

 
 
get Sue's code | forums | share your own code | registration