Information générale
Catégorie:
Fonctions Windows API
Titre:
SetDefaultPrinter Problem
The following code gives me a "No such printer called -default printer-" (where "default printer" is the name of my default printer) error when I try to reset the printer back to the default. Anybody have any idea why?
onet = CREATEOBJECT("wscript.network")
lcdefault = SET(‘PRINTER', 2) && Get the current default printer
oNet.SetDefaultPrinter(lcDefault)
This is a Windows98 machine, running on a Novell network. The default printer is a local printer, not a network printer.
More info that may or not be related:
op = onet.EnumPrinterConnections
?op.Count returns 2 - or it only finds one printer. And it is not the current default printer that it returns.
aprinters() in FoxPro returns all 27 connected printers on the workstation. The Printers folder shows 27 different printers.
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement