Article ID: 174276
Article Last Modified on 1/20/2007
APPLIES TO
- Microsoft Outlook 97 Standard Edition
This article was previously published under Q174276
SYMPTOMS
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.
STATUS
This behavior is by design.
MORE INFORMATION
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
- Create a new, default Outlook contact form.
- On the form's Tools menu, click Design Outlook Form.
- On the Form menu, click View Code.
Enter the following code into the Script Editor:
Sub Item_Open() Item.GetInspector.ShowFormPage("P.2") End Sub
- 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.
- Close and do not save changes to this contact item.
- On the Contacts menu, click New Test.
The Item_Open event in the VBScript code will run. - Click the All Fields tab, and click All Contact Fields in the Select From list.
- Note that the Message Class field is IPM.Contact.
REFERENCES
For more information about creating solutions with Microsoft Outlook 97, please see the following articles in the Microsoft Knowledge Base:
Additional query words: OutSol OutSol97
Keywords: kbpending kbprb kbprogramming KB174276