Hi again,
I just made a test using SetDefaultPrinter API call to set the default printer.
It worked fine and set the default printer to the one I specified, as could be checked in Control Pannel/Printers, but when I activate Word, open a document and tell it to print it, the printout goes to other printer: the one that appears in Word's print options dialog. If I do the same (open a document a try to print it) with Notepad, it works as expected: to the just set default printer.
What am I missing?
Thanks,
Fernando
>Hi,
>
>Doing a search in messages area I saw both methods (shown below) for doing that. There is one that works better, or is recommended?
>
>Assuming:
>
>cPrinterName = "PDF995"
>
>
Method 1:>
>Declare Integer SetDefaultPrinter In WINSPOOL.DRV String @pPrinterName
>
>SetDefaultPrinter (@cPrinterName)
>
>
Method 2:>
>oSetDefPrinter = CreateObject("WScript.Network")
>
>oSetDefPrinter.SetDefaultPrinter(cPrinterName)
>
>Release oSetDefPrinter
>
>TIA,
>
>Fernando