Document.Print method (Visio)

Prints the contents of an object to the default printer.

Syntax

expression.Print

expression A variable that represents a Document object.

Return value

Nothing

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 are using Microsoft Visual Basic for Applications (VBA) 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, use the following code.

 
 Dim vsoDocument As Visio.Document 
 Dim vsoDocumentTemp as Object 
 Dim strDummy As String 
 
 Set vsoDocument = ThisDocument 
 Set vsoDocumentTemp = vsoDocument 
 strDummy = vsoDocumentTemp.Print 

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.