[Migrated content. Thread originally posted on 14 April 2006]
We have been retrieving printer information in a COBOL program using 6.0 runtime so we can pass the printer name along to use in EXCEL. The code looks like this:CALL "win$printer" using winprint-get-current-info-ex
winprint-selection
GIVING WSS-PRINTER-RESULT.
We then use the winprint-name and winprint-port to pass to excel.
Eventually we set the active printer for excel like this:
modify olexcel @activeprinter = winprint-name1.
Winprint-name1 is the concatenation of the winprint-name and winprint-port values.
This code works fine in 6.0. but now we are trying to upgrade to the 7.0.1 runtime and there seems to be a change in what is returned in the winprint-port value.
The value returned to us in winprint-selection, winprint-port, in 6.0
is: "Ne09", but when we execute this same code in 7.0.1 the value returned in winprint-port is "IP_10.1.2.10_newest".
The printer name we used to be able to pass in 6.0 , that worked, was "\\\\Printserver\\MIS Laser on Ne09 " .
The printer name that gets passed in 7.0.1, and does not work, is "\\\\Printserver\\MIS laser on IP_10.1.2.10_newest " .
Does anyone have any suggestions on how we can get back to getting the port name "Ne09" to pass to Excel?
thanks.
Mark G.