Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / August 2006

Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
elle0612 - 17 Aug 2006 21:31 GMT
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
Jean-Guy Marcil - 18 Aug 2006 03:04 GMT
elle0612 was telling us:
elle0612 nous racontait que :

> Hi
>
[quoted text clipped - 5 lines]
> 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"

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.