Print 1st page of a 2 page document VBA Word 2000

E

elle0612

Hi

Can anyone help me please with the code to print out the first page only of
a 2 page document with VBA code.

So far I have - Activedocument.PrintOut Pages:="1"

Can someone tell me where I've gone wrong? Should I be using different
code? Is that not the right code?

Thanks
 
J

Jean-Guy Marcil

elle0612 was telling us:
elle0612 nous racontait que :
Hi

Can anyone help me please with the code to print out the first page
only of a 2 page document with VBA code.

So far I have - Activedocument.PrintOut Pages:="1"

Can someone tell me where I've gone wrong? Should I be using
different code? Is that not the right code?

Try:

ActiveDocument.ActiveWindow.PrintOut _
Range:=wdPrintFromTo, From:="1", To:="1"

If you want to use the "Pages" parameter, then try:

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





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

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