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

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


expressionexpression. SetPreviewEnabled( _GalleryName_ , _OnOrOff_ )

_表达式_代表应用程序对象的变量。expression A variable that represents an 'Application' object.


名称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



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