PrintOut Method

Applies To

Binder object, Section object.

Description

Prints every section, a subset of sections, or a single section in the binder.

Syntax 1

expression.PrintOut(What, Numbering, FirstPage, Sections, FileName, PrinterName,
úDriverName, NoPrinting)

Syntax 2

expression.PrintOut

expression Required. An expression that returns a Binder object (Syntax 1) or a Section object (Syntax 2).

What Required Variant. The section or sections to be printed. Can be one of the following BindPrintWhat constants: bindPrintActiveSection, bindPrintVisibleSections, bindPrintSelectedSections, or bindPrintSectionSubset.

Numbering Optional Variant. The page numbering scheme. Can be either of the following BindPrintNumbering constants: bindConsecutivePages or bindRestartEachSection. The default value is bindConsecutivePages.

FirstPage Optional Variant. The first page number. If this argument is omitted, page numbering starts at 1.

Sections Optional Variant. If What is bindPrintSectionSubset, this argument is a one-dimensional array of the indexes of the sections to be printed. You can specify the index number to print one section or a one-dimensional array of indexes to print multiple sections.

FileName Optional Variant. The name of the file to which the printing will be redirected.

PrinterName Optional Variant. The name of the printer to be used. If this argument is omitted, the default printer is used.

DriverName Optional Variant. The name of the printer driver to be used. If this argument is omitted, the default driver is used.

NoPrinting Optional Variant. True to set PrinterName and DriverName but not print anything. False (or omitted) to print the specified section or sections.

Remarks

You can print a single section by using Syntax 1 and specifying the index number of the section for the Sections argument, or by using one of the printing methods that the section type provides in its object model (accessed through the Object property).

See Also

PrintWhat property, SelectedSectionNames property, SinglePrintJob property.

Example

This example prints all visible sections in Binder1.obd. The first page is numbered 10.

Set myBinder = GetObject("C:\Binder1.obd", "OfficeBinder.Binder")
myBinder.PrintOut what:=bindPrintVisibleSections, _
    numbering:=bindConsecutivePages, firstPage:=10
Set myBinder = Nothing
This example prints the first and second sections and the section named "Expense Report" in Binder4.obd.

Set myBinder = GetObject("Binder4.obd", "OfficeBinder.Binder")
myBinder.PrintOut what:=bindPrintSectionSubset, _
    sections:=Array(1, 2, "Expense Report")
Set myBinder = Nothing