Results 1 to 8 of 8
  1. #1
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    PCL Printer Commands (W97)

    I've be asked to find a way to create some custom toolbar buttons with which to control a specific printer and they want me to use PCL printer commands to do it. I've read the help file on PCL, and looked at both Word and VBA help on printer commands, but I can't find anything that might tell me how to tie the two together!

    Has anybody else had to something of the sort and might be able to point me in the right direction?
    Beryl M


  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: PCL Printer Commands (W97)

    What are the settings (the PCL code) you want to send to the printer?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: PCL Printer Commands (W97)

    We have an HP Laserjet 8150 PCL 6 printer, which is set to be the new one when we replace all our printers in the near future, and around five different papers which we would like to keep permanently in the cavernous trays available with it.

    I am trying to find a way to create buttons to go on the toolbar so people can use them to decide which tray to feed from, including options like headed for page one, continuation on plain, etc. It doesn't have to be toolbar buttons, but that was the route I was looking at so far. 'PCL' isn't even mentioned in W97 or VBA help that I can find!

    Someone did suggest something about you can use field codes to insert printer control codes in a document, but I couldn't find what she meant in the fields dialog box and I haven't been able to get hold of her to ask her to elucidate.

    Any help would be appreciated! (I've got a headache over this one already!)

    Many thanks
    Beryl M


  4. #4
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Dublin, Ireland, Republic of
    Posts
    2,697
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: PCL Printer Commands (W97)

    Beryl,

    You can use the PRINT field code to send PCL codes to your printer. These codes are much like the Epson Esc codes in that they start with the ASCII code 27 (Escape). It would be useful if you a PCL reference but you can get more information from <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q135/5/69.asp?LN=EN-GB&SD=gn&FR=0>MS KB Article Q135569</A>.

    Hope that helps,

    Andrew C

  5. #5
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: PCL Printer Commands (W97)

    Andrew

    That MSKB reference looks good. When you say 'PCL reference' do you mean an example of the codes the printer uses? Because if you do, I've got the list of those from its helpfile - eg [Esc]&l1O to print in landscape.

    However, I think that article will enable me to get going ... I don't suppose you know how I would go about writing macros to use these codes so I could have a toolbar button that I click, eg to print the current document in landscape, to use the above example? I'd like to avoid having to put the codes on the individual documents if I can.

    Again, many thanks for your help.
    Beryl M


  6. #6
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: PCL Printer Commands (W97)

    Hi Beryl,
    I confess I don't know a lot about Word, but I think something along the lines of the following would work to add a print field:
    Selection.Fields.Add Selection.Range, -1, "PRINT 27 &l1S"
    Your code could then either delete the field or not save the document (assuming it had been saved before printing!)
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  7. #7
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: PCL Printer Commands (W97)

    Thanks Rory - I'll try that!
    Beryl M


  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: PCL Printer Commands (W97)

    I think you are better off manipulating the Page Setup settings than using PRINT fields, if you can do it that way. I'd reserve the PRINT fields for effects that are difficult or impossible to achieve with native Word facilities.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •