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 必需Required 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. 您可以通过在https://msdn.microsoft.com/library中搜索 MSDN 库来查找所有 Visio 库的控件 id 列表。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.