Solved

How to set paper source in Lexmark T644 using VBA

Posted on 2012-03-25
6
980 Views
Last Modified: 2012-04-02
I have a sheet of labels (Word 2010 document) at work and would like to be able to automatically select Tray 2 (which contains label paper) whenever I print this page. The printer is a Lexmark T644.

I'm a bit familiar with VBA code if anyone can write a macro that would do this, I could make that work.

Thanks
0
Comment
Question by:calbais
  • 3
  • 2
6 Comments
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 37764806
Have you tried:
Options.DefaultTray = "Tray 2"

Open in new window

?
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37764818
or:
Application.MailingLabel.DefaultLaserTray = wdPrinterLowerBin

Open in new window

?
You may have to experiment, because the correct setting will depend on the printer driver.
wdPrinterLowerBin is one of about fifteen WdPaperTray enumertaion constants.
0
 

Author Comment

by:calbais
ID: 37786655
Where can I find "WdPaperTray" enumeration constants?
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37793431
Type wdpapertray in the search box of the Help facility. This is a copy and paste from the entry:
wdPrinterAutomaticSheetFeed 7 Automatic sheet feed. 
wdPrinterDefaultBin 0 Default bin. 
wdPrinterEnvelopeFeed 5 Envelope feed. 
wdPrinterFormSource 15 Form source. 
wdPrinterLargeCapacityBin 11 Large-capacity bin. 
wdPrinterLargeFormatBin 10 Large-format bin. 
wdPrinterLowerBin 2 Lower bin. 
wdPrinterManualEnvelopeFeed 6 Manual envelope feed. 
wdPrinterManualFeed 4 Manual feed. 
wdPrinterMiddleBin 3 Middle bin. 
wdPrinterOnlyBin 1 Printer's only bin. 
wdPrinterPaperCassette 14 Paper cassette. 
wdPrinterSmallFormatBin 9 Small-format bin. 
wdPrinterTractorFeed 8 Tractor feed. 
wdPrinterUpperBin 1 Upper bin. 

Open in new window

0
 

Author Closing Comment

by:calbais
ID: 37799095
It was tray 1 on our printer but this works. Thanks for your help!
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This article will shed light on the latest trends when it comes to your resume building needs. For far too long, the traditional CV format has monopolized the recruitment market.
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question