You can get the current printer name from the win.ini or from the
registry. To get the current printer name from the win.ini file use the following code:String ls_Temp, ls_PrinterName
ls_Temp = ProfileString( "win.ini", &
"windows", "device", "Printer Not Set" )
ls_PrinterName = Left( ls_Temp, Pos( ls_Temp, "," ) - 1 )
ls_Temp = Mid( ls_Temp, gf_lastpos( ls_Temp, "," ) + 1 )
ls_Temp = ProfileString( "win.ini", "network", ls_Temp, "" )
IF ls_Temp <> "" THEN
ls_PrinterName = ls_PrinterName + " on " + ls_Temp
END IF
MessageBox( 'PrinterName', ls_PrinterName )
|