Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

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

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

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

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.

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

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

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

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

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:

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

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?

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

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.

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

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?

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

Just set your printer to PCL emulation mode.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close