Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Setting Windows Default Printer

Status
Not open for further replies.

drosenkranz

Programmer
Sep 13, 2000
360
US
Can you set the Window's 95 default printer from within FoxPro 6.0? [\b]
 
You can use:
SET PRINTER TO NAME MyWindowsPrinterName

or, if using Windows NT,
SET PRINTER TO \\servername\printername
[sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
Hi Drosenkranz,

As FoxDev mentions, you can change the default printer for your VFP session with SET PRINTER TO NAME [myprinter].

If you're wanting to change the default Windows printer, you can use the Windows Scripting Host. Example:

WshNetwork=CreateObject(&quot;WScript.Network&quot;)
WshNetwork.SetDefaultPrinter(&quot;\\Server\Print1&quot;)


Also, check out these KB articles-

How to change the default windows printer using win.ini:
How to change the default paper source of a printer:
[sig]<p>Jon Hawkins<br><a href=mailto: jonscott8@yahoo.com> jonscott8@yahoo.com</a><br><a href= > </a><br>Focus on the solution....Not the problem.[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top