OL2002: Form Menu and Layout Menu Appear When You Use a Custom Form (291421)
The information in this article applies to:
This article was previously published under Q291421 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.
STATUSMicrosoft 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: This behavior does not occur in Outlook 97 or Outlook 98, but does occur in Outlook 2000.
REFERENCESFor 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:
287530 OL2002: Questions About Custom Forms and Outlook Solutions
Modification Type: | Minor | Last Reviewed: | 3/1/2004 |
---|
Keywords: | kbbug kbnofix KB291421 |
---|
|