Macro for Print Current Page not always working

M

Mike

I have a simple procedure for printing the current page that works some of
the times, but other times prints the entire page (print current page still
works). This is the procedure:

ActiveDocument.PrintOut Range:=wdPrintCurrentPage

I have so far not been able to figure out why some documents will print the
entire document when this runs, while others will print just the current
page. Any ideas on where to look for what might be causing the problem with
this would be greatly appreciated.

Mike
 
T

Tabasco Ed

I have a simple procedure for printing the current page that works some of
the times, but other times prints the entire page (print current page still
works). This is the procedure:

ActiveDocument.PrintOut Range:=wdPrintCurrentPage

I have so far not been able to figure out why some documents will print the
entire document when this runs, while others will print just the current
page. Any ideas on where to look for what might be causing the problem with
this would be greatly appreciated.

Mike

Try this, it works for me:

'Print the current page.
Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, _
Item:=wdPrintDocumentContent, Copies:=1, _
Pages:=CStr(Selection.Information(wdActiveEndPageNumber)), _
PageType:=wdPrintAllPages, Collate:=True, _
Background:=False, PrintToFile:=False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top