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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Win2000 Changing Default Printer From Access Via Code

Status
Not open for further replies.

KillJoy

Technical User
May 12, 2001
1
AU
Can anyone shed any light on the best way to go about retrieving and setting the default printer in Win2000 from VBA? In win95/98 you could do it via Win.Ini but this is no longer it seems
TIA
Tom
 

In VBSCRIPT, it's pretty easy. You should be able to use something like this.

Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.AddPrinterConnection "LPT1:", "\\Server\Print1"
WshNetwork.SetDefaultPrinter "\\Server\Print1"


Fengshui_1998

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top