Application.SetPreviewEnabled 方法 (Visio)Application.SetPreviewEnabled Method (Visio)

为 Microsoft Visio 用户界面中的库打开或关闭预览。Turns preview on or off for a gallery in the Microsoft Visio user interface.

语法Syntax

expressionexpression. SetPreviewEnabled( _GalleryName_ , _OnOrOff_ )

expression:表示“Application”对象的变量。expression A variable that represents an 'Application' object.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
GalleryNameGalleryName RequiredRequired StringString 要为其设置预览状态的库的名称。The name of the gallery for which you want to set the preview status. 请参阅注解。See Remarks.
OnOrOffOnOrOff 必需Required BooleanBoolean 如果为 True,则为指定的库打开预览;如果为 False,则关闭预览。True to turn preview on for the specified gallery; False to turn preview off.

返回值Return value

NothingNothing

说明Remarks

对于_GalleryName_参数,您必须通过指定的库的控件 ID。For the GalleryName parameter, you must pass the control ID for the specified gallery. 您可以通过搜索 MSDN 库的所有 Visio 库查找的控件 Id 列表在https://msdn.microsoft.com/library。You can find a list of control IDs for all Visio galleries by searching the MSDN library at https://msdn.microsoft.com/library.

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.