PageSetup Class

lhowell

New Member
I am trying to set the Orientation and Margins in Excel using com-handles.

chWorksheet:pageSetup:Orientation = 2. (I have tried many variations too) and I keep getting the same error: Unable to set the Orientation property of the PageSetup class.

I saw when doing research some people mentioned having a default printer (which is setup).

Can someone please help me with this error?

Thanks in Advance.
 

lord_icon

Member
In UR earlier statements. Is the printer attribute assigned a value before trying to set a further attribute (chWorksheet:pageSetup:Orientation ).
Progress works sequentialy, as the flow enters win32 at this command. If the printer is not known, it will fall down.
Good luck
 

GregTomkins

Active Member
Suggestion: bypass Progress and try setting the property directly in VBA (alt-F11 to get the VBA IDE from most versions of Excel) and see what it is expecting. If that proves challenging, Google the zillions of VBA forums for help. VBA = one of the wonders of the world, IMHO.
 
Top