Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SetDefaultPrinter Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
SetDefaultPrinter Problem
Divers
Thread ID:
00940809
Message ID:
00940809
Vues:
67
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
Fil
Voir

Click here to load this message in the networking platform