PtrDevice:SetPrinterByName() Method

<< Click to Display Table of Contents >>

Navigation:  RpPrinter & PtrDevice Class Overview > PtrDevice Class >

PtrDevice:SetPrinterByName() Method

Previous pageReturn to chapter overviewNext page

Purpose

To select a printer by name.

Syntax

<oPtrDevice>:SetPrinterByName(cPrinter, [cPort]) lSuccess                                (LOGIC)

Arguments

cPrinter

 Name of printer to select.

cPort

 Optional parameter to allow the selection of a printer and a port.

Description

This method attempts to select a printer based on the name you specify.  If it is successful, it returns TRUE, otherwise it returns FALSE.

Example

// Print to the HP LJet II

oPtrDevice:SetPrinterByName("HP LaserJet II")