Skip to main content

[archive] win$printer

  • April 28, 2009
  • 1 reply
  • 0 views

[Migrated content. Thread originally posted on 27 April 2009]

Hello
I am using the following code to try to change the orientation of a printer to landscape. It is not working and the return code is 5. Does anyone know what code 5 means?
Thanks!:confused:
move "\\\\mplsfp01\\Canon iR5000-6000 PCL5e"
to winprint-name
move wprtsel-orient-landscape to
winprint-curr-orientation
call "win$printer"
using winprint-set-printer winprint-selection
giving r-code
display message box r-code

1 reply

[Migrated content. Thread originally posted on 27 April 2009]

Hello
I am using the following code to try to change the orientation of a printer to landscape. It is not working and the return code is 5. Does anyone know what code 5 means?
Thanks!:confused:
move "\\\\mplsfp01\\Canon iR5000-6000 PCL5e"
to winprint-name
move wprtsel-orient-landscape to
winprint-curr-orientation
call "win$printer"
using winprint-set-printer winprint-selection
giving r-code
display message box r-code
In the sample directory of your ACUCOBOL-GT installation, is the program prndemox.cbl which illustrates most of the win$printer features, including the ability to change orientation.

I would also recommend you use the -ex version, it is better.