HideFormPage 方法

       

隐藏检查器中的窗体页面。

expression.HideFormPage(PageName)

expression  必选。该表达式返回 Inspector 对象。

PageName  必选,String 类型。要隐藏的页面的显示名称。

示例

本 Visual Basic for Applications 示例使用 HideFormPage 隐藏新创建的 ContactItem 的“常规”页,然后显示该项目。

Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olContactItem)
Set myPages = myItem.GetInspector.ModifiedFormPages
Set myPage = myPages.Add("General")
Set myInspector = myOlApp.ActiveInspector
myInspector.HideFormPage("General")
myItem.Display

如果使用 VBScript,则不创建 Application 对象,而且也不能使用命名常量。本示例说明如何使用 VBScript 执行相同任务。

Set myItem = Application.CreateItem(2)
Set myPages = myItem.GetInspector.ModifiedFormPages
Set myPage = myPages.Add("General")
Set myInspector = Application.ActiveInspector
myInspector.HideFormPage("General")
myItem.Display