Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a PCL Macro with VB... How???

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Okay, here's the scoop: I have a form (overlay) stored on the printer as a pcl macro through Resource Manager. Now, I'd like to be able to send the command for the overlay to print and the data to incorporate into it out of a VB progam.

I'm guessing that what I need is the escape sequence to identify the stored macro. We have standard forms that print and the program can send the data to fill in the form.


 
Inside the Macrodate it should be like that:
<ESC>&f1Y //Macro with ID 1
<ESC>&f0X //Start macro data
.
.
data
.
.
<ESC>&f1X // end macro

you can do that shorter by using:
<ESC>&f1y0X .. data
<ESC>&f1X

Also you can put more that one macro in it by using other marco IDs.
like:
<ESC>&f1y0X .. data // Macro ID 1
<ESC>&f1X
<ESC>&f123y0X .. data // Macro ID 123
<ESC>&f1X

To call the macro you should use:
<ESC>&f2X // to execute Macro
<ESC>&f3X // for call Macro
<ESC>&f4X // automatic overlay ( ..5X stopt )

If you want to execute macro 123 it would be:
<ESC>&f123y2X


 
Okay, I tried several variations of the code above, and all I get is a sheet with the commands printed on it.

Do I need to go around the Windows printer driver?

 
Yes, you ll have to copy the macro to the printer.
like if the printer is on lpt1
copy filename.* lpt1

:)
Better to have an programm doing it for you.
 
That sounds dandy.... except....
I would be sending these codes to the printer out of VB to a NETWORKED printer.

So now how do I avoid getting nothing but codes on a sheet of paper?
 
Just set your printer to PCL emulation mode.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top