View Single Post
 
Old 01-20-2022, 05:48 PM
Jerry In Houston Jerry In Houston is offline Windows 11 Office 2016
Novice
 
Join Date: Jan 2022
Location: Texas
Posts: 3
Jerry In Houston is on a distinguished road
Question Error 4120 when using a printing macro

I use a macro to print several multi page documents. My printer will not do what I want it to do so my macro prints the document one page at a time: Here is a bit of the code;
Selection.GoTo What:=wdGoToPage, Which:=1
The print routine
Selection.GoTo What:=wdGoToPage, Which:=2
The print routine
Selection.GoTo What:=wdGoToPage, Which:=3
The print routine
Selection.GoTo What:=wdGoToPage, Which:=4 ==== The error occurs
I get an error 4120 Bad Prameter
All of these documents are over 30 pages long so there is a page 4. I have used a counting loop for the “Which:=” number but is still throws the error when the value = 4.

Any Help??
Reply With Quote