Visio 2003 Developer's Survival Pack Tools and Samples

Chapter 32: Document Preview (VB)
Visio 2003 DSP home   This page

Overview

Folder Description
DocPreview.exe Program which can display the preview picture of a Visio document.
PreviewPicTest.vsd Sample Visio document with a nice preview picture
Other DocPreview.* VB6 source code for this application.
   

Installation

For general comments on installation of VB6 applications see here: VBNotes.htm.

This particular application has the following requirements:

Requirement Description
VisShe.dll A dll supplied with Visio that provides a service to other apps for reading the preview picture from a Visio document. This dll is installed with Visio, and is needed both at design time and runtime. Effectively this means that the Visio preview picture can only be viewed if Visio is installed.
Type library for interfaces:
IPersistFile, IExtractImage

 

One way to fulfill this requirement is to obtain the "OLE Automation" (stdole.tlb) type library created by Eduardo Morcillo, and available here: Edanmo's VB Page > Type Libraries.

To install, use command:
    regtlib stdole.tlb
(adjust command for your paths).

   

See Also

C# version of this sample.


Article Created: 2003-09-01  Last edit: Last edit: 03-10-14 Graham Wideman
Go to:
  DiagramAntics.com