Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
PRR PRR is offline
external usenet poster
 
Posts: 113
Default Macro to print current page only in Word 2010 isn't working

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 FilePrint, 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.
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default Macro to print current page only in Word 2010 isn't working

A macro that works in previous versions is:

Sub PrintCurrentPage()
Application.PrintOut Range:=wdPrintCurrentPage
End Sub

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"PRR" wrote in message
...
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 FilePrint, 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.


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
PRR PRR is offline
external usenet poster
 
Posts: 113
Default Macro to print current page only in Word 2010 isn't working

And it works in 2010 as well. Thanks.

Overall I do like it, although its a bit slower than 2007. I gotta
say--moving from 2007 to 2010 is gonna be much smoother than going
from 2003 to 2007.



On Nov 21, 8:50*pm, "Suzanne S. Barnhill" wrote:
A macro that works in previous versions is:

Sub PrintCurrentPage()
* * Application.PrintOut Range:=wdPrintCurrentPage
End Sub

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USAhttp://word.mvps.org

  #4   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] sagiva@itl-labs.com is offline
external usenet poster
 
Posts: 2
Default Macro to print current page only in Word 2010 isn't working

On Sunday, November 22, 2009 at 5:22:58 AM UTC+2, PRR wrote:
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 FilePrint, 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.


  #5   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] sagiva@itl-labs.com is offline
external usenet poster
 
Posts: 2
Default Macro to print current page only in Word 2010 isn't working

Hello,
I'd new around here and would be happy to create a simple but tricky MACRO:
How could I write a "word Macro" for:
File -- SHare -- Email -- Send as PDF ?
Thanks!
Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
print current page word 07 CMKY Microsoft Word Help 2 September 24th 09 06:23 PM
current page macro TNT Microsoft Word Help 3 July 17th 08 10:05 PM
Creating a "print current page" macro or button David B. Appleton Microsoft Word Help 4 February 17th 07 08:25 AM
Print current page macro not working Mike Page Layout 0 August 8th 05 02:34 PM
Macro for print current page not always working Mike Page Layout 0 August 4th 05 05:11 PM


All times are GMT +1. The time now is 07:24 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"