Set Printer Defaults - Really important

Can I use a VBS / WSH script to set a default printer AND what the default orientation and paper size should be ?


\\server\printer1      landscape       A4.

etc ?
Who is Participating?
JackOfPHConnect With a Mentor Commented:
HOWTO: Open the Printer Properties Dialog;en-us;q198860

HOWTO: Set Which Printer Is the System Default Printer;en-us;q266767

HOWTO: Use GetDeviceCaps to Determine Margins on a Page;en-us;q193943

HOWTO: Connect to a Network Printer with the Win32 API;en-us;q154007
Yes, you can use wsh to set a default printer:

    Dim oWsh As Object
    Set oWsh = CreateObject("Wscript.Network")
    Call oWsh.SetDefaultPrinter("Printer A")

But I don't think you can use it to set default orientation and paper size of the printer. To achieve that goal, you need to use a set of Printer Control APIs.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.