Share via


_Document.PrintOut Method

Prints all or part of the specified document.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Sub PrintOut ( _
    ByRef Background As Object, _
    ByRef Append As Object, _
    ByRef Range As Object, _
    ByRef OutputFileName As Object, _
    ByRef From As Object, _
    ByRef To As Object, _
    ByRef Item As Object, _
    ByRef Copies As Object, _
    ByRef Pages As Object, _
    ByRef PageType As Object, _
    ByRef PrintToFile As Object, _
    ByRef Collate As Object, _
    ByRef ActivePrinterMacGX As Object, _
    ByRef ManualDuplexPrint As Object, _
    ByRef PrintZoomColumn As Object, _
    ByRef PrintZoomRow As Object, _
    ByRef PrintZoomPaperWidth As Object, _
    ByRef PrintZoomPaperHeight As Object _
)
'Usage
Dim instance As _Document
Dim Background As Object
Dim Append As Object
Dim Range As Object
Dim OutputFileName As Object
Dim From As Object
Dim To As Object
Dim Item As Object
Dim Copies As Object
Dim Pages As Object
Dim PageType As Object
Dim PrintToFile As Object
Dim Collate As Object
Dim ActivePrinterMacGX As Object
Dim ManualDuplexPrint As Object
Dim PrintZoomColumn As Object
Dim PrintZoomRow As Object
Dim PrintZoomPaperWidth As Object
Dim PrintZoomPaperHeight As Object

instance.PrintOut(Background, Append, _
    Range, OutputFileName, From, To, Item, _
    Copies, Pages, PageType, PrintToFile, _
    Collate, ActivePrinterMacGX, ManualDuplexPrint, _
    PrintZoomColumn, PrintZoomRow, PrintZoomPaperWidth, _
    PrintZoomPaperHeight)
void PrintOut(
    ref Object Background,
    ref Object Append,
    ref Object Range,
    ref Object OutputFileName,
    ref Object From,
    ref Object To,
    ref Object Item,
    ref Object Copies,
    ref Object Pages,
    ref Object PageType,
    ref Object PrintToFile,
    ref Object Collate,
    ref Object ActivePrinterMacGX,
    ref Object ManualDuplexPrint,
    ref Object PrintZoomColumn,
    ref Object PrintZoomRow,
    ref Object PrintZoomPaperWidth,
    ref Object PrintZoomPaperHeight
)

Parameters

  • Background
    Type: System.Object%
    Optional Object. Set to True to have the macro continue while Microsoft Word prints the document.
  • Append
    Type: System.Object%
    Optional Object. Set to True to append the specified document to the file name specified by the OutputFileName argument. False to overwrite the contents of OutputFileName.
  • OutputFileName
    Type: System.Object%
    Optional Object. If PrintToFile is True, this argument specifies the path and file name of the output file.
  • From
    Type: System.Object%
    Optional Object. The starting page number when Range is set to wdPrintFromTo.
  • To
    Type: System.Object%
    Optional Object. The ending page number when Range is set to wdPrintFromTo.
  • Copies
    Type: System.Object%
    Optional Object. The number of copies to be printed.
  • Pages
    Type: System.Object%
    Optional Object. The page numbers and page ranges to be printed, separated by commas. For example, "2, 6-10" prints page 2 and pages 6 through 10.
  • PrintToFile
    Type: System.Object%
    Optional Object. True to send printer instructions to a file. Make sure to specify a file name with OutputFileName.
  • Collate
    Type: System.Object%
    Optional Object. When printing multiple copies of a document, True to print all pages of the document before printing the next copy.
  • ActivePrinterMacGX
    Type: System.Object%
    Optional Object. This argument is available only in Microsoft Office Macintosh Edition. For additional information about this argument, consult the language reference Help included with Microsoft Office Macintosh Edition.
  • ManualDuplexPrint
    Type: System.Object%
    Optional Object. True to print a two-sided document on a printer without a duplex printing kit. If this argument is True, the PrintBackground and PrintReverse properties are ignored. Use the PrintOddPagesInAscendingOrder and PrintEvenPagesInAscendingOrder properties to control the output during manual duplex printing. This argument may not be available to you, depending on the language support (U.S. English, for example) that you’ve selected or installed.
  • PrintZoomColumn
    Type: System.Object%
    Optional Object. The number of pages you want Word to fit horizontally on one page. Can be 1, 2, 3, or 4. Use with the PrintZoomRow argument to print multiple pages on a single sheet.
  • PrintZoomRow
    Type: System.Object%
    Optional Object. The number of pages you want Word to fit vertically on one page. Can be 1, 2, or 4. Use with the PrintZoomColumn argument to print multiple pages on a single sheet.
  • PrintZoomPaperWidth
    Type: System.Object%
    Optional Object. The width to which you want Word to scale printed pages, in twips (20 twips = 1 point; 72 points = 1 inch).
  • PrintZoomPaperHeight
    Type: System.Object%
    Optional Object. The height to which you want Word to scale printed pages, in twips (20 twips = 1 point; 72 points = 1 inch).

See Also

Reference

_Document Interface

_Document Members

Microsoft.Office.Interop.Word Namespace