Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to change Default printer from VFP under win98
Message
 
To
28/06/2002 09:51:29
Xiaodong Yan
Better Database Solutions
Spring, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00673248
Message ID:
00673260
Views:
16
>Hi,
>
>I use ShellExcute() win API function to print an image file from VFP. Now, user wanted me to send the output to a different paper try. I realized that "Set Printer to Name XXXX" no longer works since SellExcute() always send to the Default printer, no matter what.
>
>Is there a way to change my default printer from VFP?
>
>Thanks,
>
Sheldon,

See the series of article on the Windows Script Host that Ed Rauh and I wrote. They appeared in the VFUG newsletter and are available on-line at www.vfug.org.

The series started in September 2000. The answer to your question, is contained in the December, 2000 issue covering the WScript.Network object. This object has a method that will allow you to change the default printer. This method does work with local printers. See the article for details.

Note, however, that under Win98, installation of the WSH was optional, but was the default. Information regarding determining its presence can be found in the first issue of the series.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform