Specify Pages to Print

A

animedreamer

Hello all. I am opening a multi-page word document via VBA code and
was wondering if there is a way to specify the pages I want printed.
For example, if the document is six pages long and I only want to print
the first page, how would I code this? Thanks for your help.

-Vincent
 
J

Jean-Guy Marcil

(e-mail address removed) was telling us:
(e-mail address removed) nous racontait que :
Hello all. I am opening a multi-page word document via VBA code and
was wondering if there is a way to specify the pages I want printed.
For example, if the document is six pages long and I only want to
print the first page, how would I code this? Thanks for your help.

Something like:

ActiveDocument.PrintOut Range:=wdPrintRangeOfPages, Pages:="1"

See the PrintOut method in the VBA help for more info.


--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
I

Ithaca

if it's going to be the same page range every time you open the document you
can record a macro... where you enter Ctrl+P>desired page range and then
you're done.

If you want different pages depending on the job necessary then you can
create multiple macros similar to each other and just change the ranges.
maybe create a tool bar with the page ranges you want printed too...

Good luck
 

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