>Friends:
>
>How do you change the Windows default printer from inside VFP?
>
>I am running a process that prints to the Windows default printer. I want to change the default printer within VFP, and after the process completes, reset the Windows default printer back to what it was.
>
>TIA
Gary,
While you can use modify the Win.ini file to change the default printer in Win9x, I'm not certain that it'll work under later versions. Therefore, I'd recommend the Windows Script Host's Network Object, like so
oNet = CREATEOBJECT("WScript.Network")
oNet.SetDefaultPrinter(< printer name >)
and, yes, it works with local printers.
George
Ubi caritas et amor, deus ibi est