>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