Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21237

Error opening Printer.Port. Bad file name or number!!

$
0
0
I was trying to print to the printer in raw mode for sending control codes. I am not being able to control the printer.height by using printer.print method. The printer is ejecting too much paper. I even tried setting paper size custom. Nothing Succeeded.Therefore I am trying to send raw data to printer directly. Why am I getting this error? I need to send raw data to printer.Thank You

Code:

    'Open Printer.Port For Output Access Write As #5 'Tried This
    Open Printer.Port For Output As #5 'Trying this
    'Open "Ne03:" For Output As #5 'Trying by directly assigning the value of the printer.port
        Print #5, "BILL"
    Close #5


Viewing all articles
Browse latest Browse all 21237

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>