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 / January 2007

Tip: Looking for answers? Try searching our database.

copies

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MoJR - 05 Jan 2007 03:43 GMT
Hello,
I currently use the following code to print pages in a document.

"ActiveDocument.Protect Type:=wdAllowOnlyFormFields, _
       NoReset:=True
   
   With Dialogs(wdDialogFilePrint)
       .Background = False
       .Range = wdPrintRangeOfPages
       .Pages = "0,1,2,2,3,3,3,4,4,4,5"
       .Execute
   "End With
It works very well. I copied the entire macro this code belongs to into
another document. I tried to alter the .Pages= property(?) to print the pages
I needed in the other document. It prints 1 copy of each page. I need
multiple copies of each page.
The documet consists of a letter and 4 other pages. I need 1 copy of the
letter, 3 copies of pages 2&3, and 2copies of pages 4&5.
How can I alter the code to accomodate my needs?
Thank you,
mojr
Doug Robbins - Word MVP - 05 Jan 2007 04:44 GMT
.Pages = "1,2,2,2,3,3,3,4,4,5,5"

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hello,
> I currently use the following code to print pages in a document.
[quoted text clipped - 18 lines]
> Thank you,
> mojr
Jay Freedman - 05 Jan 2007 04:49 GMT
The page numbers in the Pages string are the "adjusted" page numbers
that take into account any restarting of numbering in various
sections. If you have section breaks and numbering restarts, you need
to use the p1s1 sort of syntax (see
http://www.word.mvps.org/FAQs/Formatting/PrintMultipleSections.htm).

If there are no section breaks, so the whole document is one section
that starts on page 1, then your description of what you want would
require the string

  .Pages = "1,2,2,2,3,3,3,4,4,5,5"

--
Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

>Hello,
>I currently use the following code to print pages in a document.
[quoted text clipped - 17 lines]
>Thank you,
>mojr
 
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.