11-27-2022, 02:40 PM
I'm not sure how many lines of code you have to send to the printer but if it's not that many I simply use the LPRINT statement. Using the Find Replace, I first change all Print to LPrint and then all the other lines of code which do not have a Print statement I just insert LPRINT " at the beginning of the line. After printing I put the code back to it's original. The more code you want to print the more tedious this is but it works.
IE Original Code
A = 5
B = 33.3
C = 123
If B > C then exit sub
if C > B then
F = A * B
Print F
End If
Using SEARCH - FIND - REPLACE
Find Print
Replace with LPrint
Using Copy Paste - Insert LPrint " at the beginning of each line.
Code to printer now looks like this
LPrint "A = 5"
LPrint "B = 33.3"
LPrint "C = 123"
LPrint "If B > C then exit sub"
LPrint "if C > B then "
LPrint "F = A * B"
LPrint F
LPrint "End I"
It would be nice if there was a print to printer option in the IDE tools but I understand PRINT is a monster on it's own to deal with. Not sure if this helps you at all.
IE Original Code
A = 5
B = 33.3
C = 123
If B > C then exit sub
if C > B then
F = A * B
Print F
End If
Using SEARCH - FIND - REPLACE
Find Print
Replace with LPrint
Using Copy Paste - Insert LPrint " at the beginning of each line.
Code to printer now looks like this
LPrint "A = 5"
LPrint "B = 33.3"
LPrint "C = 123"
LPrint "If B > C then exit sub"
LPrint "if C > B then "
LPrint "F = A * B"
LPrint F
LPrint "End I"
It would be nice if there was a print to printer option in the IDE tools but I understand PRINT is a monster on it's own to deal with. Not sure if this helps you at all.