|
-
Sep 17th, 2008, 08:52 AM
#1
Thread Starter
Fanatic Member
[RESOLVED] VBA Word - Tray Selection
Hi all, I am currently underway developing a macro, also in another thread in this board, I have managed to get it to print, however im having problems with tray selection.
Code:
If cboSelectPrinterModel = "HP 4000/4050" And optSingleLetter = True Then
Application.ScreenUpdating = False
With ActiveDocument.PageSetup
Selection.GoTo what:=wdGoToSection, which:=GoToFirst, Count:=1, name:=""
.FirstPageTray = 260
.OtherPagesTray = 259
.SectionStart = wdSectionContinuous
End With
Application.PrintOut Background:=True, Item:=wdPrintDocumentContent, Copies:=txtCopies.Text
Application.ScreenUpdating = True
Unload Me
This code should select the First Page Tray (on a HP Laserjet 4000 to be Tray two (the first actual "Bin Tray"), and Other Pages should Be Printed from the second bin (tray three!), because of the printers that we use, we have to use the Tray ID's as opposed to wdPrinterLowerBin etc.
Can anyone suggest why no matter what this does, it always prints to the same darned tray (tray three)
A few points to consider:
1) The Printer is defaulted to automatically select tray, I have manually set it to print from tray 1 and tray 2 individually, but it still makes no difference!
2)this code is based under the print button, by which point the printer has been defined, and hopefully, the printer settings (duplex etc) will have been put into place!
3) I have tried this by LPT1 connection and ethernet connection, I can see no reason for this to actually be a corruption of data on transfer!
4) The Coding is behind options and is non ammendable by those who use the macro. So if a certain option is chosen then the first page is printed from tray two and all others are printed through tray three, another option may mean that all pages are printed from tray three.
Any help will be greatly appreciated!
James
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|