Article ID: 272521
Article Last Modified on 9/29/2003
APPLIES TO
- Microsoft Outlook 2000 Standard Edition
This article was previously published under Q272521
SYMPTOMS
When you use a custom Microsoft Outlook form, both the Form menu and the Layout menu appear at the top of the form.
WORKAROUND
You can workaround this problem by adding Visual Basic Scripting Edition (VBScript) code to the form that will programmatically remove the Form and Layout menus when an item is opens. The following code will accomplish this:
Sub Item_Open() FormMenusVisible False End Sub Sub Item_Close() FormMenusVisible True End Sub Sub FormMenusVisible(boolVisible) Dim objCommandBar Dim objCBMenu Set objCommandBar = Item.GetInspector.CommandBars.Item("Menu Bar") Set objCBMenu = objCommandBar.FindControl(, 30145) objCBMenu.Visible = boolVisible Set objCBMenu = objCommandBar.FindControl(, 30146) objCBMenu.Visible = boolVisible Set objCBMenu = Nothing Set objCommandBar = Nothing End Sub
NOTE: This code will also hide the two menus when you enter form design mode. To work around this side effect you can hold down the Shift key when opening the form to prevent the code from running.
STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.
MORE INFORMATION
Both the Form and Layout menus ought to only appear when the form is in design mode. However, if you change any of the default actions on a form, the menus also appear when you use the form. Most of the commands on each of these menus are disabled, so you cannot perform any actions by using these menus. However, the one exception is the View Code command, which means that users of the form can easily access and view custom script written in Visual Basic Scripting Edition (VBScript) behind a custom Outlook form.
Note that this behavior does not occur in previous versions of Outlook.
REFERENCES
For additional information about available resources and answersto commonly asked questions about Microsoft Outlook solutions, click the article number below to view the article in the Microsoft Knowledge Base:
146636 OL2000: Questions About Custom Forms and Outlook Solutions
Additional query words: OutSol OutSol2000 OL2K
Keywords: kbbug kbpending KB272521