Microsoft KB Archive/174276

From BetaArchive Wiki

Article ID: 174276

Article Last Modified on 1/20/2007


  • Microsoft Outlook 97 Standard Edition

This article was previously published under Q174276


If you use the ShowFormPage or HideFormPage methods of the Microsoft Outlook object model with a custom form, the Message Class field of the form will revert back to the default message class.


This behavior is by design.


The ShowFormPage and HideFormPage methods can be used to display or hide one or more of a custom form's pages, such as "General" and "Details," on a contact form. These methods are typically used in Microsoft Visual Basic Scripting Edition (VBScript) to create "dynamic" forms that change based on some criteria.

Because these commands change the layout of the form, Outlook creates a one-off item and therefore the message class reverts back to the default message class for that type of item.

For more information about one-off forms, please see the following article in the Microsoft Knowledge Base:

176567 OL97: Working with Form Definitions and One-Off Forms

An item's message class indicates which form is associated with that particular item. For example, the message class of the default Outlook contact form is IPM.Contact, and the message class of a custom form based on the Contact form is IPM.Contact.<Form Name>.

For more information about message classes, please see the following article in the Microsoft Knowledge Base:

170301 OL97: How to Update Existing Items to Use a New Custom Form

Steps to Reproduce Problem

  1. Create a new, default Outlook contact form.
  2. On the form's Tools menu, click Design Outlook Form.
  3. On the Form menu, click View Code.
  4. Enter the following code into the Script Editor:

          Sub Item_Open()
          End Sub
  5. On the File menu, click Publish Form As. Name the form "Test," make sure the contacts folder is selected as the destination, and then click Publish.
  6. Close and do not save changes to this contact item.
  7. On the Contacts menu, click New Test.

    The Item_Open event in the VBScript code will run.
  8. Click the All Fields tab, and click All Contact Fields in the Select From list.
  9. Note that the Message Class field is IPM.Contact.


For more information about creating solutions with Microsoft Outlook 97, please see the following articles in the Microsoft Knowledge Base:

166368 OL97: How to Get Help Programming with Outlook

170783 OL97: Q&A: Questions about Customizing or Programming Outlook

Additional query words: OutSol OutSol97

Keywords: kbpending kbprb kbprogramming KB174276