Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / June 2005

Tip: Looking for answers? Try searching our database.

PCL printer control codes question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
djd1atwfu - 29 Jun 2005 22:08 GMT
We are trying to use printer control codes in a Word 2003 document to
tell the printer to use the envelope feeder on our Lexmark Optra S 2450 with
2 additional paper trays and an envelope feeder.  Using the command {PRINT
027"&l4H"} in a Word 2003 document successfully told the printer to switch to
tray 2 with no trouble.  In the old days with a HP printer, the envelope
feeder command would be to substitute the 4 in the command above with a 6.  
This corresponds with what the Lexmark manual tells us to use, but does not
seem to work with this printer.  What could I use in place of the 6 to tell
the printer to print to a #10 envelope in the envelope feeder.  Many thanks
for any help you can offer.
Jay Freedman - 30 Jun 2005 02:33 GMT
>We are trying to use printer control codes in a Word 2003 document to
>tell the printer to use the envelope feeder on our Lexmark Optra S 2450 with
[quoted text clipped - 6 lines]
>the printer to print to a #10 envelope in the envelope feeder.  Many thanks
>for any help you can offer.

The page at http://www.lexmark.com/publications/techref.html points to
the same PDF file for all the Optra models (although they don't list
the S).

In that file, Table 2-21 lists the numbers for the &l#H command, and 6
is the number for the envelope feeder. If that doesn't work, I think
you need to complain to Lexmark.

--
Regards,
Jay Freedman
Microsoft Word MVP         FAQ: http://word.mvps.org
djd1atwfu - 30 Jun 2005 13:21 GMT
Thanks for your note.  Yes, I have already looked in Table 2-21 of that exact
document, and have spoken with Lexmark tech support via email.  They say that
this should work, and it is a Word issue.  The printer works fine, and pulls
envelopes happily from a "normal" word document where you specify the
envelope feeder.  

I should add that these printer control codes are in a Word document that is
actually a merge file.  The first two pages are 8.5 x 11 sheets of paper, and
the third page of the document is an envelope.  When the merge is performed
and you chose to create a new document (edit individual letters), the print
preview shows that this document is still being created on an 8.5 x 11 sheet
of paper instead of an envelope.  The codes successfully direct the printer
to pull page 2 from tray 2, but fail to tell it to switch to the envelope
feeder for the 3rd page.  

> >We are trying to use printer control codes in a Word 2003 document to
> >tell the printer to use the envelope feeder on our Lexmark Optra S 2450 with
[quoted text clipped - 19 lines]
> Jay Freedman
> Microsoft Word MVP         FAQ: http://word.mvps.org
Jay Freedman - 30 Jun 2005 15:06 GMT
Where is the PRINT field -- in the body of the text at the start of the
third page or the end of the second page, or in the header of the section
that contains the third page? If it's in the body, try going to Tools >
Options > Compatibility and checking "Print body text before header/footer".

I'm puzzled by the print preview result. If the merge's main document has a
section break and a page size change for the third page, the merged letters
*should* show the same format. But I'm not a mail merge expert, so I don't
know what pitfalls may lurk there. It could be that Word thinks "page 3 is
Letter size, and that doesn't fit in the envelope feeder, so I won't change
trays". <shrug>

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

> Thanks for your note.  Yes, I have already looked in Table 2-21 of
> that exact document, and have spoken with Lexmark tech support via
[quoted text clipped - 36 lines]
>> Jay Freedman
>> Microsoft Word MVP         FAQ: http://word.mvps.org
djd1atwfu - 30 Jun 2005 16:03 GMT
Jay--

The PRINT field is in the body of the text, and it is the first text on that
page.  I have discovered that Word is actually _ignoring_ these printer codes
all together.  I thought that my printer control code directing it to pull
from tray 2 was working.  In fact, I removed that printer control code
altogether, and it still pulled from tray 2.  It was the page setup code that
was directing it to pull from tray 2.  

I should have mentioned that this is a mail merge document that is a part of
several pages of logic.  When you run this merge by itself, it works fine.  I
have used section breaks to distinguish the pages from each other, and used
Word's page setup to tell it which tray to pull from and which paper size to
use.  This works fine.  However, when I run the original master document,
which calls this page when appropriate, it doesn't work.  It is as if Word
loses the logic built into this page when it is called from another Master
document.   I was hoping to use the Printer control code commands to combat
that.  In fact, my problem has now become that Word simply loses its page
formatting when I run this merge and it goes through the logic.  The logic
and merge itself works properly, but it is ignoring my page setup
instructions.  It will pull from tray 2 as the page setup instructs it to,
but it will not pull from the envelope feeder.  It's as if it loses that when
the logic runs.  Thanks again for any ideas.  

> Where is the PRINT field -- in the body of the text at the start of the
> third page or the end of the second page, or in the header of the section
[quoted text clipped - 48 lines]
> >> Jay Freedman
> >> Microsoft Word MVP         FAQ: http://word.mvps.org
Jay Freedman - 30 Jun 2005 17:08 GMT
The description of the process and the problem keeps getting wider -- from a
page to a mail merge to a "master" document with "logic" (is this a
macro?) -- and I think it's now exceeded my grasp of what's going on.

However, you may get some ideas from this series of articles by MVP Jonathan
West:

Controlling the Printer from Word VBA

Part 1: Using VBA to Select the Paper Tray
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=101

Part 2: Using VBA to control Duplex, Color Mode and Print Quality
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=116

Part 3: Dealing with Different Paper Sizes
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=132

Part 4: Getting printer driver details
http://pubs.logicalexpressions.com/Pub0009/LPMArticle.asp?ID=183

Signature

Regards,
Jay Freedman
Microsoft Word MVP          FAQ: http://word.mvps.org

> Jay--
>
[quoted text clipped - 81 lines]
>>>> Jay Freedman
>>>> Microsoft Word MVP         FAQ: http://word.mvps.org
djd1atwfu - 30 Jun 2005 18:45 GMT
Jay--

Thanks for your thoughts.  I really do appreciate them.  I'm afraid I do not
have a very good "grasp" of the proper terminology to use to describe the
problem I am having.  I have created a Word document that is calling a series
of other documents based on specific criteria found in the mail merge
datafile.  
Here is an example of my document:

Faculty/Staff Indicator:  {MERGEFIELD FAC_STAFF_IND}
Designation Name:  {MERGEFIELD ACK_DESG_DESC}
:::::::::::::::::::::::::::::::::::::::::::::::::::Section Break (Next
Page):::::::::::::::::::::::::::::::::::::::::::::::::
{IF {MERGEFIELD FULL_NAME} <> " " "{INCLUDETEXT
"C://WFU_ACKS//envelope.doc"}" ""}
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::Section Break
(Next Page)::::::::::::::::::::::::::::::::::::::::::::::::::
{IF {MERGEFIELD ACK_GIFT_AMT_FORMATTED } > 0 {INCLUDETEXT
"C://WFU_ACKS//Receipt.doc"}" ""}

So, basically my problem is the same.  This merge works fine, and the end
result is formatted fine when I run it as is above.  However, this document
is a "piece" of a larger mail merge document, and when the appropriate
criteria is met, and this merge is executed, it loses my envelope formatting,
and simply prints the envelope information on an 8.5 x 11 sheet of paper.  

I'm afraid I only know enough to be dangerous.  ;)  I don't have any idea
about programming in Visual Basic.  I will definitely look through the links
you sent me in the above response.  Thanks!

> The description of the process and the problem keeps getting wider -- from a
> page to a mail merge to a "master" document with "logic" (is this a
[quoted text clipped - 102 lines]
> >>>> Jay Freedman
> >>>> Microsoft Word MVP         FAQ: http://word.mvps.org
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.