Share via


Document.PrintOutEx Method

Publisher Developer Reference

Prints all or part of the specified publication.

Syntax

expression.PrintOut(From, To, PrintToFile, Copies, Collate, PrintStyle)

expression   A variable that represents a Document object.

Parameters

Name Required/Optional Data Type Description
From Optional Long The starting page number.
To Optional Long The ending page number.
PrintToFile Optional String The path and file name of a document to be printed to a file.
Copies Optional Long The number of copies to be printed.
Collate Optional Boolean When printing multiple copies of a document, True to print all pages of the document before printing the next copy.
PrintStyle Optional PbPrintStyle The print style to use. See Remarks for possible values.

Remarks

The PrintStyle parameter can be one of the PbPrintStyle constants declared in the Microsoft Office Publisher type library.

If PrintStyle is pbPrintStyleMultipleCopiesPerSheet or pbPrintStyleMultiplePagesPerSheet, Publisher ignores any value you pass for the Collate parameter.

Example

This example prints the active publication.

Visual Basic for Applications
  Sub PrintActivePublication()
    ThisDocument.PrintOutEx
End Sub

See Also