Table of contents

Document.PreviewPicture 属性 (Visio)Document.PreviewPicture Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
2 参与人员

获取或设置当您单击文件选项卡,然后单击新建显示在打开对话框中的预览图片。读/写。Gets or sets the preview picture shown in the Open dialog box and when you click the File tab, and then click New. Read/write.


表达式PreviewPictureexpression . PreviewPicture

表达式_一个表示文档对象的变量。_expression A variable that represents a Document object.

返回值Return Value



PreviewPicture属性返回并接受只有 EMF 文件 (增强型图元文件)。如果您传递给PreviewPicture的文件为非 EMF 文件,Microsoft Visio 将引发异常。The PreviewPicture property returns and accepts only EMF files (enhanced metafiles). Microsoft Visio will raise an exception if the file you pass to PreviewPicture is a non-EMF file.

要删除现有的预览,请设置为NothingPreviewPicture属性。To delete an existing preview, set the PreviewPicture property to Nothing .

可以使用PreviewPicture属性模板未存储在其中的任何关系图中包含预览图片。You can use the PreviewPicture property to include a preview picture in a template that does not have any diagrams stored in it.

COM 提供了一个 picture 对象,该对象包含在基础系统图片支持上面的IPictureDisp接口的标准实现。IPictureDisp接口公开图片对象的属性,并可在 Microsoft Visual Basic 创建一个StdPicture对象作为实现stdole类型库中。从 Visio 中 (VBA) 项目的所有 Visual Basic for Applications 自动引用stdole类型库。COM provides a standard implementation of a picture object that has the IPictureDisp interface on top of the underlying system picture support. The IPictureDisp interface exposes a picture object's properties and is implemented in the stdole type library as a StdPicture object creatable within Microsoft Visual Basic. The stdole type library is automatically referenced from all Visual Basic for Applications (VBA) projects in Visio.

若要获取支持的IPictureDisp接口的StdPicture对象有关的信息:To get information about the StdPicture object that supports the IPictureDisp interface:

  1. 开发人员选项卡上的代码组中,单击Visual BasicIn the Code group on theDeveloper tab, click Visual Basic.

  2. 视图菜单上,单击对象浏览器On the View menu, click Object Browser.

  3. 工程/库列表中,单击stdoleIn the Project/Library list, click stdole.

  4. 下检查名为StdPicture的类。Under Classes, examine the class named StdPicture .

IPictureDisp接口的详细信息,请参阅 MSDN,Microsoft 开发人员网络上的 Microsoft 平台 SDK。For details about the IPictureDisp interface, see the Microsoft Platform SDK on MSDN, the Microsoft Developer Network.

目前,仅在流程解决方案可以使用PreviewPicture属性,因为IPictureDisp接口不能封送。Currently, only in-process solutions can use the PreviewPicture property because the IPictureDisp interface cannot be marshaled.

© 2018 Microsoft