|
-
Oct 26th, 2005, 09:44 AM
#1
Thread Starter
Member
[RESOLVED] Communicate with printer through COM port
I've started doing a small program which required to print out on Olivetti PR2e Passbook Printer (text only, the printer is connected to computer by COM1 port without any driver installed)
Please help
Best regard
-
Oct 26th, 2005, 09:56 AM
#2
Re: Communicate with printer through COM port
You have posted the same question in ClassicVb.
Are you doing this through a VB program or through VBA?
Assitance you get from this section will be VBA specific which might not work with VB; conversely any assistance you get in ClassicVb with be VB specific and might not work in VBA.
-
Oct 28th, 2005, 07:16 PM
#3
Thread Starter
Member
Re: Communicate with printer through COM port
I'm doing this with both VB and VBA, in fact I'm making an MS.Access program which require to print out text on a printed form. Thank you for your direction and inttention
-
Oct 28th, 2005, 07:35 PM
#4
Re: Communicate with printer through COM port
You need a manual to the printer to get the escape codes. Are you writing a driver or was that someone else? I saw a few links to this forum as well.
-
Nov 2nd, 2005, 09:47 AM
#5
Thread Starter
Member
Re: Communicate with printer through COM port
I've got the manual, but i didn't know what must I do at first. Some escape code work properly but I can't print out the text. My VB code is as follow:
Visual Basic 6.0
PrnPort.CommPort = 1
PrnPort.Settings = "9600,n,8,1"
PrnPort.ParityReplace = "?"
PrnPort.Handshaking = comRTSXOnXOff
PrnPort.PortOpen = True
PrnPort.RThreshold = 1
PrnPort.SThreshold = 1
PrnPort.DTREnable = True
PrnPort.RTSEnable = True
PrnPort.Output=”Hello” & Chr$(13) & chr$(10) ‘Print out the text - perform no action
PrnPort.Output=Chr$(&H1B) & Chr$(&H4F)) ‘Esc O Eject paper - working properly
Please help
Best regard
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|