Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-16-2021, 10:19 PM
Rosemary Rosemary is offline documents print setup defined in page setup, but overriden by printer settings. macro required? Windows 10 documents print setup defined in page setup, but overriden by printer settings. macro required? Office 2019
Novice
documents print setup defined in page setup, but overriden by printer settings. macro required?
 
Join Date: Feb 2021
Posts: 4
Rosemary is on a distinguished road
Default documents print setup defined in page setup, but overriden by printer settings. macro required?

I am using Office 2010 and my documents have a combination of paper types (letterhead, follow-on and blank), defined by using a combination of the PageSetup dialog box in Page Layout (see attached) and Section breaks.

Our office is upgrading to Office 2019 and now the printer settings on our photocopier over-rides all these settings.

A macro might work, except my attempts so far are either for current page to a particular printer tray, or Page 1 to Tray X and Page 2 onwards to Tray Y.



It seems the only way I can print my letters will be to divide them into separate documents.

I'm open to any suggestions! I'm desperate to find a solution before my upgrade.

Thank you!
Attached Files
File Type: docx printing definitions.docx (411.0 KB, 1 views)
Reply With Quote
  #2  
Old 02-16-2021, 10:49 PM
gmayor's Avatar
gmayor gmayor is offline documents print setup defined in page setup, but overriden by printer settings. macro required? Windows 10 documents print setup defined in page setup, but overriden by printer settings. macro required? Office 2019
Expert
 
Join Date: Aug 2014
Posts: 3,568
gmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to behold
Default

Print to a specific printer explains how to print to separate trays using a macro and how to establish the tray numbers.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 02-16-2021, 10:56 PM
Rosemary Rosemary is offline documents print setup defined in page setup, but overriden by printer settings. macro required? Windows 10 documents print setup defined in page setup, but overriden by printer settings. macro required? Office 2019
Novice
documents print setup defined in page setup, but overriden by printer settings. macro required?
 
Join Date: Feb 2021
Posts: 4
Rosemary is on a distinguished road
Default

@gmayor - thank you. I have located the printer tray numbers - it is more that my document may have (and of course not every letter follows the same pattern...

eg page 1: letterhead, page 2 follow-on (MP tray), //Section Break // page 3: letterhead, page 4: letterhead, page 5: letterhead //Section Break // page 6: blank, page 7: blank //Section Break // page 8: letterhead, page 9 onwards: blank

my limited knowledge of macros does not extend to working around this!
Reply With Quote
  #4  
Old 02-17-2021, 04:35 AM
gmayor's Avatar
gmayor gmayor is offline documents print setup defined in page setup, but overriden by printer settings. macro required? Windows 10 documents print setup defined in page setup, but overriden by printer settings. macro required? Office 2019
Expert
 
Join Date: Aug 2014
Posts: 3,568
gmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to behold
Default

Bearing in mind that I don't have access to your printer to check it, the following should work. As I indicated in my web page some printers don't respond to calling the trays by name and require the tray IDs as described on the web page.

In which case Options.DefaultTray would have to be Options.DefaultTrayID and the two IDs would replace the values sLetterhead and sPlain.

I have turned off background printing as this is presumably a shared printer

Code:
Sub PrintToTrays()
Dim sCurrentPrinter As String
Dim sTray As Long
Const sLetterhead As String = "Drawer 3"
Const sPlain As String = "Multi-purpose Tray"

    With Dialogs(wdDialogFilePrintSetup)
        Options.DefaultTray = sLetterhead
        PrintIt "1"

        Options.DefaultTray = sPlain
        PrintIt "2"

        Options.DefaultTray = sLetterhead
        PrintIt "3-5"

        Options.DefaultTray = sPlain
        PrintIt "6-7"

        Options.DefaultTray = sLetterhead
        PrintIt "8"

        Options.DefaultTray = sPlain
        PrintIt "9-999"

        .Execute
    End With
End Sub

Sub PrintIt(sPrintRange As String)
    Application.PrintOut FileName:="", _
        Range:=wdPrintRangeOfPages, _
        Item:=wdPrintDocumentWithMarkup, _
        copies:=1, _
        Pages:=sPrintRange, _
        PageType:=wdPrintAllPages, _
        collate:=True, _
        Background:=True, _
        PrintToFile:=False, _
        PrintZoomColumn:=0, _
        PrintZoomRow:=0, _
        PrintZoomPaperWidth:=0, _
        PrintZoomPaperHeight:=0
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #5  
Old 02-18-2021, 03:37 PM
Rosemary Rosemary is offline documents print setup defined in page setup, but overriden by printer settings. macro required? Windows 10 documents print setup defined in page setup, but overriden by printer settings. macro required? Office 2019
Novice
documents print setup defined in page setup, but overriden by printer settings. macro required?
 
Join Date: Feb 2021
Posts: 4
Rosemary is on a distinguished road
Default

@gmayor
please forgive my ignorance. Does this macro example mean you have specified the tray selection for every page (as per my example)? so eg "3-5" means pages 3-5?
This is exceptionally helpful, and I am very appreciative of you writing this code. My problem is that not every letter follows that structure. It is intensively variable, so that macro would not be universal - if I've understood correctly.
Please correct me if I've misunderstood. I'm trying to learn as I go.
(yes - my trays are called:- Plain: PrinterUpperBin, Letterhead 1: PrinterLowerBin, Letterhead 2: 264 and MP tray (follow-on): PrinterManualFeed)
Reply With Quote
  #6  
Old 02-18-2021, 10:48 PM
gmayor's Avatar
gmayor gmayor is offline documents print setup defined in page setup, but overriden by printer settings. macro required? Windows 10 documents print setup defined in page setup, but overriden by printer settings. macro required? Office 2019
Expert
 
Join Date: Aug 2014
Posts: 3,568
gmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to beholdgmayor is a splendid one to behold
Default

The macro would not be universal. It would have to be modified for each document, or you could drive it from a more user friendly dialog, but that would be beyond your skill set, given your comments, and beyond the scope of this forum. If you want to discuss that further contact me via my web site.

The code I posted is relatively simple. Basically it uses the PrintIt macro to create a print job, when supplied with page numbers from the main macro PrintToTrays.

The trays are defined as the variables (here two trays defined, changed to reflect your comments, but you can add others)
Code:
Const sLetterhead As String = "PrinterLowerBin"
Const sPlain As String = "PrinterUpperBin"
The process changes the bin for each print job and sends the page numbers to the PrintIt macro - so yes 3-5 would mean pages 3, 4 & 5.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #7  
Old 02-18-2021, 11:10 PM
Rosemary Rosemary is offline documents print setup defined in page setup, but overriden by printer settings. macro required? Windows 10 documents print setup defined in page setup, but overriden by printer settings. macro required? Office 2019
Novice
documents print setup defined in page setup, but overriden by printer settings. macro required?
 
Join Date: Feb 2021
Posts: 4
Rosemary is on a distinguished road
Default

@gmayor
yes, that all makes sense - and damn Microsoft for allowing printer properties to over-ride Print Dialog settings.
Thank you for clarifying and understanding that yes, I am very much a beginner (and quite out of my depth on this one!!)
At least this gives me some sort of starting point to work with, for which I am very grateful. Thank you!
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant find Page setup for printer excel android NeverTheLess Excel 0 10-19-2016 07:24 AM
documents print setup defined in page setup, but overriden by printer settings. macro required? Priview/Print Setup for Project Rahmat_uk20 Project 3 08-07-2012 03:05 AM
Page Setup gus PowerPoint 0 03-09-2010 09:51 PM
print setup alkey Excel 1 02-09-2007 06:47 AM
Page Setup Ryan Word 0 01-24-2007 10:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:59 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft