Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Entering escape codes for printing in Word 2003
XPP SP2
Office 2003 SP2 Hello, Is there anyone here that still remembers how to put in escape sequences into Word? Many (many) years ago I did just that for the original LaserJet and the LaserJet II, but have totally forgotten what, or how I did it, and, unfortunately, I never kept the manuals. I want to automate some functions in templates, eg select a specific printer tray (cassette) for printing when creating a new document on a template. The commands to be entered are normal PCL 5 command. I think I know that you should use the Print field command, ie , and then just enter the escape sequence for the specific tray, like { Print 27"l2H } (Tray 1 in multi-sheet mode). I got the 27" from a MS Knowledgebase article (ID : 78652, intended for Word 97), but that is obviously not the right way to generate an escape code for Word 2003, since it doesn't work at all. I guess this also could be achieved via a macro, but can you do an AutoRun macro, that only runs when you open a specific template? Grateful for any ideas. Best regards, Eric G Stockholm, Sweden |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Entering escape codes for printing in Word 2003
If you don't get an answer here, try the experts in
microsoft.public.word.printingfonts. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Eric G" wrote in message ... XPP SP2 Office 2003 SP2 Hello, Is there anyone here that still remembers how to put in escape sequences into Word? Many (many) years ago I did just that for the original LaserJet and the LaserJet II, but have totally forgotten what, or how I did it, and, unfortunately, I never kept the manuals. I want to automate some functions in templates, eg select a specific printer tray (cassette) for printing when creating a new document on a template. The commands to be entered are normal PCL 5 command. I think I know that you should use the Print field command, ie , and then just enter the escape sequence for the specific tray, like { Print 27"l2H } (Tray 1 in multi-sheet mode). I got the 27" from a MS Knowledgebase article (ID : 78652, intended for Word 97), but that is obviously not the right way to generate an escape code for Word 2003, since it doesn't work at all. I guess this also could be achieved via a macro, but can you do an AutoRun macro, that only runs when you open a specific template? Grateful for any ideas. Best regards, Eric G Stockholm, Sweden |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Entering escape codes for printing in Word 2003
Hi Eric,
You can find a reference page for PCL5 codes at http://pcl.to/reference. For your specific question, go to http://pcl.to/reference/#pcl_paper_control. Translating the codes shown on that page (which is the way you'd find them in the HP PCL manual) to Word's Print field goes like this: - The guide shows an "EC" symbol that represents the "Escape code". This code has the decimal value 27, so that's the first thing in the Print field following the keyword. Everything else in the field needs to be enclosed in a pair of double quotes. - The next character in all the paper-control codes and many others is an ampersand (&). Other types of codes use a parenthesis or an asterisk in this position. - The code l2H corresponds to the manual feed tray. Other codes that look useful are l1H for Tray 1 and l4H for Tray 2. (Be sure to use a lower case ell before the number.) So the complete Print field for manual feed should be { PRINT 27"&l2H" } and the others are similar. I'm not sure how a macro would be involved in this process, other than to insert Print fields at specific places. I think it would be much easier to put the field directly in the template where it's needed. To satisfy your curiosity, though, it is possible to place an AutoNew and/or an AutoOpen macro in a specific template, and the code runs only when a document based on that template is opened. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. On Wed, 28 Dec 2005 10:07:25 -0600, "Suzanne S. Barnhill" wrote: If you don't get an answer here, try the experts in microsoft.public.word.printingfonts. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Eric G" wrote in message ... XPP SP2 Office 2003 SP2 Hello, Is there anyone here that still remembers how to put in escape sequences into Word? Many (many) years ago I did just that for the original LaserJet and the LaserJet II, but have totally forgotten what, or how I did it, and, unfortunately, I never kept the manuals. I want to automate some functions in templates, eg select a specific printer tray (cassette) for printing when creating a new document on a template. The commands to be entered are normal PCL 5 command. I think I know that you should use the Print field command, ie , and then just enter the escape sequence for the specific tray, like { Print 27"l2H } (Tray 1 in multi-sheet mode). I got the 27" from a MS Knowledgebase article (ID : 78652, intended for Word 97), but that is obviously not the right way to generate an escape code for Word 2003, since it doesn't work at all. I guess this also could be achieved via a macro, but can you do an AutoRun macro, that only runs when you open a specific template? Grateful for any ideas. Best regards, Eric G Stockholm, Sweden |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Entering escape codes for printing in Word 2003
If your printer driver accepts PCL commands, you can use a PRINT field. A
PRINT field is simply a type of field that allows you to send instructions directly to the printer. Eg for duplex printing: There are 3 possible data values for duplex setting: PRINT 27"&l0S" simplex PRINT 27"&l1S" vertical duplex . PRINT 27"&l2S" horizontal duplex (bookformat) The codes after PRINT are 27 (escape), double quote, ampersand, lowercase L, 0, 1 or 2, uppercase S and finally terminated with a double quote. Thus for horizontal duplex you would insert the following field : { PRINT 27"&l2S" } Was the original Laserjet PCL5? HP's web site should be able to supply the necessary command set - or you may find another reference at Google. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Eric G" wrote in message ... XPP SP2 Office 2003 SP2 Hello, Is there anyone here that still remembers how to put in escape sequences into Word? Many (many) years ago I did just that for the original LaserJet and the LaserJet II, but have totally forgotten what, or how I did it, and, unfortunately, I never kept the manuals. I want to automate some functions in templates, eg select a specific printer tray (cassette) for printing when creating a new document on a template. The commands to be entered are normal PCL 5 command. I think I know that you should use the Print field command, ie , and then just enter the escape sequence for the specific tray, like { Print 27"l2H } (Tray 1 in multi-sheet mode). I got the 27" from a MS Knowledgebase article (ID : 78652, intended for Word 97), but that is obviously not the right way to generate an escape code for Word 2003, since it doesn't work at all. I guess this also could be achieved via a macro, but can you do an AutoRun macro, that only runs when you open a specific template? Grateful for any ideas. Best regards, Eric G Stockholm, Sweden |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Entering escape codes for printing in Word 2003
Jay,
Many thanks for your response. Well, I though I was sort of right in my efforts when I put in the { PRINT Print 27"l2H } command, to select the manual tray on the printer. But my document still wouldn't print correctly to my printer, a Xerox Phaser 8550DX. I though something might be funny my printer, so I got up into my attic to bring down an old (+/- 10 years in the attic) HP LaserJet 4 Plus. I installed this printer, and it fired up without problems (that's quality) and yes the print command, selecting bins and paper sizes, works like a charm! Consequently, it's the Phaser that's got some problem with the PCL command, not the Print field command in Word. I've contacted Xerox about the problem and trust that I'll hear from them within a day, or so. I'll post back the solution if the problem is solved. Once again, many thanks Jay for your input, it's much appreciated. Best regards, Eric G Stockholm, Sweden "Jay Freedman" wrote in message ... Hi Eric, You can find a reference page for PCL5 codes at http://pcl.to/reference. For your specific question, go to http://pcl.to/reference/#pcl_paper_control. Translating the codes shown on that page (which is the way you'd find them in the HP PCL manual) to Word's Print field goes like this: - The guide shows an "EC" symbol that represents the "Escape code". This code has the decimal value 27, so that's the first thing in the Print field following the keyword. Everything else in the field needs to be enclosed in a pair of double quotes. - The next character in all the paper-control codes and many others is an ampersand (&). Other types of codes use a parenthesis or an asterisk in this position. - The code l2H corresponds to the manual feed tray. Other codes that look useful are l1H for Tray 1 and l4H for Tray 2. (Be sure to use a lower case ell before the number.) So the complete Print field for manual feed should be { PRINT 27"&l2H" } and the others are similar. I'm not sure how a macro would be involved in this process, other than to insert Print fields at specific places. I think it would be much easier to put the field directly in the template where it's needed. To satisfy your curiosity, though, it is possible to place an AutoNew and/or an AutoOpen macro in a specific template, and the code runs only when a document based on that template is opened. -- Regards, Jay Freedman Microsoft Word MVP FAQ: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. On Wed, 28 Dec 2005 10:07:25 -0600, "Suzanne S. Barnhill" wrote: If you don't get an answer here, try the experts in microsoft.public.word.printingfonts. -- Suzanne S. Barnhill Microsoft MVP (Word) Words into Type Fairhope, Alabama USA Word MVP FAQ site: http://word.mvps.org Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit. "Eric G" wrote in message ... XPP SP2 Office 2003 SP2 Hello, Is there anyone here that still remembers how to put in escape sequences into Word? Many (many) years ago I did just that for the original LaserJet and the LaserJet II, but have totally forgotten what, or how I did it, and, unfortunately, I never kept the manuals. I want to automate some functions in templates, eg select a specific printer tray (cassette) for printing when creating a new document on a template. The commands to be entered are normal PCL 5 command. I think I know that you should use the Print field command, ie , and then just enter the escape sequence for the specific tray, like { Print 27"l2H } (Tray 1 in multi-sheet mode). I got the 27" from a MS Knowledgebase article (ID : 78652, intended for Word 97), but that is obviously not the right way to generate an escape code for Word 2003, since it doesn't work at all. I guess this also could be achieved via a macro, but can you do an AutoRun macro, that only runs when you open a specific template? Grateful for any ideas. Best regards, Eric G Stockholm, Sweden |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Entering escape codes for printing in Word 2003
Hello Graham,
Thanks for your reply. Nice hearing from you again. As you can see in my response to Jay, I've pinned down the problem to my printer, the Xerox Phaser 8550DX. I've also installed my old LaserJet 4 Plus (10 years +, and more that 1 million copies), that's got what HP calls "Enhanced PCL 5", ie PCL 5. This printer obeys any command given to it, including complex nested PLC command. On HP's site, I also found some 5 different PCL Technical reference manuals that I found most useful as reference works. Now I'm waiting for the Xerox support dept go get back to me, shouldn't take to long, they've got quite good support. I get back to the thread, if I get something positive out of Xerox. Best regards, Eric G Stockholm, Sweden "Graham Mayor" wrote in message ... If your printer driver accepts PCL commands, you can use a PRINT field. A PRINT field is simply a type of field that allows you to send instructions directly to the printer. Eg for duplex printing: There are 3 possible data values for duplex setting: PRINT 27"&l0S" simplex PRINT 27"&l1S" vertical duplex . PRINT 27"&l2S" horizontal duplex (bookformat) The codes after PRINT are 27 (escape), double quote, ampersand, lowercase L, 0, 1 or 2, uppercase S and finally terminated with a double quote. Thus for horizontal duplex you would insert the following field : { PRINT 27"&l2S" } Was the original Laserjet PCL5? HP's web site should be able to supply the necessary command set - or you may find another reference at Google. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org "Eric G" wrote in message ... XPP SP2 Office 2003 SP2 Hello, Is there anyone here that still remembers how to put in escape sequences into Word? Many (many) years ago I did just that for the original LaserJet and the LaserJet II, but have totally forgotten what, or how I did it, and, unfortunately, I never kept the manuals. I want to automate some functions in templates, eg select a specific printer tray (cassette) for printing when creating a new document on a template. The commands to be entered are normal PCL 5 command. I think I know that you should use the Print field command, ie , and then just enter the escape sequence for the specific tray, like { Print 27"l2H } (Tray 1 in multi-sheet mode). I got the 27" from a MS Knowledgebase article (ID : 78652, intended for Word 97), but that is obviously not the right way to generate an escape code for Word 2003, since it doesn't work at all. I guess this also could be achieved via a macro, but can you do an AutoRun macro, that only runs when you open a specific template? Grateful for any ideas. Best regards, Eric G Stockholm, Sweden |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
take yet another lesson from wordperfect "reveal codes" | Microsoft Word Help | |||
Word 2002 and Word 2003 trading default file association | Microsoft Word Help | |||
is word perfect compatible with office word? | Microsoft Word Help | |||
Word 2003 Mailmerge problem - works in Word 2000 | Mailmerge | |||
WP Delay Code - Word Equiv | Microsoft Word Help |