Chapter 2 -- 59
Reference Guide
"
""
" Printer.SetParameter (not yet implemented)
VTS_BOOL or Boolean
SetParameter(strParameter,
varValue).
Changes the current printer settings.
Parameters:
strParameter Required VT_BSTR or String
. Parameter name to
use.
varValue Required VT_VARIANT or Variant
. Value to set.
"
""
" Printer.SwitchTo ()
VTS_BSTR or String SwitchTo( strPrinterName,
strPortName, boolDirectAccess ).
Changes the current printer.
Return value: Returns the name of the installed printer.
Automatically installs a printer if no printer is already installed.
You don’t need to add a printer through the user interface.
Parameters:
strPrinterName Required VT_BSTR or String
.Printer‘s
name to switch to.
strPortName Optional VT_BSTR or String
.Port’sname to
switch to.
boolDirectAccess Optional VT_BOOL or Boolean
. Is the
connection of the port direct or not.
Form 1
SwitchTo(« THTPrinter L-1234 », « LPT1: », FALSE).
Result of this instruction is « THTPrinter L-1234,LPT1 : ».
Form 2
SwitchTo(« THTPrinter L-1234, ->COM3: »).
Result of this instruction is « Copy of THTPrinter
L-1234, ->COM3: » because printer’s name is unique.
You can either use form 1 or form 2.
Don’t insert spaces between the components in Form 2.
Notice that the names are case sensitive !