SetDefaultPrinter Method |
Description
Assigns a remote printer the role od Default Printer.
PowerBASIC Syntax
Arguments
Remarks
The SetDefaultPrinter method fails when using a DOS-based printer connection. You cannot use the SetDefaultPrinter method to determine the name of the current default printer.
Example [PowerBASIC]
#INCLUDE "WSHOM.INC"
DIM pWshNetwork AS IWshNetwork DIM bstrLocalName AS STRING DIM bstrRemoteName AS STRING
pWshNetwork = NEWCOM "WScript.Network" bstrLocalName = UCODE$("LPT1") bstrRemoteName = UCODE$("\\Server\Print1") pWshNetwork.AddConnection(bstrLocalName, bstrRemoteName) pWshNetwork.SetDefaultPrinter UCODE$("\\research\library1")
|