Print method

Microsoft Visio Developer Reference

Print method

See also   Example   

Prints the contents of an object to the default printer.

Version added

2.0

Syntax

object.Print

object

Required. An expression that returns a Page or Document object to print.

Remarks

For a Document object, this method prints all of the document's pages. Background pages are printed on the same sheet of paper as the foreground pages to which they are assigned.

For a Page object, this method prints the page and its background page (if any) on the same sheet of paper.

If you're using Microsoft Visual Basic for Applications or Visual Basic, you must assign the method result to a dummy variable and you must apply the method to a variable of type Object, not type Visio.Document or Visio.Page. For example, to print a document:

Dim docObj As Visio.Document
Dim docObjTemp as Object
Dim dummy As String
Set docObj = ThisDocument
Set docObjTemp = docObj
dummy = docObjTemp.Print