P
PRR
I tried to create a macro (placed it on the QAT) whereby only the
current page would be printed. I turned on the Record Macro, then went
to File>Print, then under Print Settings, selected Print Current Page.
After I hit the printer icon, the current page only is printed. So far
all is well. At that point, the print dialog disappears, then I go up
to the Ribbon and then select Stop Recording the macro. But the next
time I go to the QAT and click on that macro, what is printed is NOT
the current page, but the page number that was printed up when I
recorded the macro--e.g., if I was viewing page 3 when I made the
macro and printed up the current page, in the next document that I
want to print the current page for, instead of the current page, what
is printed is page 3.
Here is the macro code:
Sub PrintCurrentPage()
'
' PrintCurrentPage Macro
'
'
Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages,
Item:= _
wdPrintDocumentWithMarkup, Copies:=1, Pages:="1", PageType:= _
wdPrintAllPages, Collate:=True, Background:=True,
PrintToFile:=False, _
PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
This macro will only print page 1.
Can anyone help me out with this code? I really did use this macro on
the QAT a lot.
current page would be printed. I turned on the Record Macro, then went
to File>Print, then under Print Settings, selected Print Current Page.
After I hit the printer icon, the current page only is printed. So far
all is well. At that point, the print dialog disappears, then I go up
to the Ribbon and then select Stop Recording the macro. But the next
time I go to the QAT and click on that macro, what is printed is NOT
the current page, but the page number that was printed up when I
recorded the macro--e.g., if I was viewing page 3 when I made the
macro and printed up the current page, in the next document that I
want to print the current page for, instead of the current page, what
is printed is page 3.
Here is the macro code:
Sub PrintCurrentPage()
'
' PrintCurrentPage Macro
'
'
Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages,
Item:= _
wdPrintDocumentWithMarkup, Copies:=1, Pages:="1", PageType:= _
wdPrintAllPages, Collate:=True, Background:=True,
PrintToFile:=False, _
PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
End Sub
This macro will only print page 1.
Can anyone help me out with this code? I really did use this macro on
the QAT a lot.