Link to home
Start Free TrialLog in
Avatar of Bianchi928
Bianchi928

asked on

Printer Orientation

I want to change a list fo printers from Portrait to Landscape...I have this code

I need some help here

strComputer = "????"
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colInstalledPrinters =  objWMIService.ExecQuery("SELECT * FROM Win32_PrinterConfiguration where name like '%u104c2%")

wscript.echo

For Each objPrinter in colInstalledPrinters
      wscript.echo ObjPrinter.Orientation
      ObjPrinter.Orientation =
      objPrinter.Put_
Next

Wscript.echo "Done"
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark image

Avatar of Bianchi928
Bianchi928

ASKER

I've seen that link prior to my question. If I set ObjPrinter.Orientation = 2 and then check what the result is..it still shows protrait..That's what I don't understand

Cheers
sorry. then I do not have any suggestions
ASKER CERTIFIED SOLUTION
Avatar of ltlbearand3
ltlbearand3
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
That's all I wanted. You'ev got the points

Cheers