Printing Visio Documents

Generally you will want to let the user of Visio print on demand, that is, select File, Print whenever the user is ready to print the diagram she is working on. However, if you want to programmatically print, you have two options. The first is to use the Print method of the Page object or the Print method of the Document object. The Print method returns a null that must be captured, so the structure of the Print method must be as follows:

Dim varDummy As Variant
varDummy = pagObj.[Print]

or

Dim varDummy As Variant
varDummy = docObj.[Print]

The second option is similar to what I described previously when I showed you the DoCmd method for opening a file. You can invoke the DoCmd method for printing a file as follows: ...

Get Professional Development with Visio® 2000 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.