PrintOut Method

Prints the active document to a specified printer or file.

expression.PrintOut(From, To, Copies, PrinterName, PrintToFileName, PrintAnnotation, FitMode)

*expression   * Required. An expression that returns a Document object.

From    Optional Long. The first page to print.

To    Optional Long. The last page to print. Default is -1 (prints all pages).

Copies    Optional Long. The number of copies to print. Default is 1.

PrinterName    Optional String. The name of the optional destination printer.

PrintToFileName    Optional String. The name of the optional destination file.

PrintAnnotation    Optional Boolean. Specifies whether the printout includes user annotations.

MiPRINT_FITMODES

FitMode can be one of the following MiPRINT_FITMODES constants.
miPRINT_ACTUALSIZE (0)
miPRINT_PAGE (1)

Remarks

If the image is too large for the printed page, the miPRINT_PAGE option scales the image down to fit on the page. However, if the image already fits on the page, miPRINT_PAGE prints the image at its actual size; it does not scale the image up to fill the printed page.

Example

The following example loads a new document, prints a single copy of the second page of the document to a local printer (without annotations), and then shrinks the output to the page, if necessary.

Sub TestPrintOut()
  
  Dim miDoc As MODI.Document
  
  Set miDoc = New MODI.Document
  miDoc.Create "c:\document1.tif"
  
  miDoc.PrintOut 2, 2, 1, "MyPrinter"
  
  Set miDoc = Nothing

End Sub

Applies to | Document Object