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

Tip: Looking for answers? Try searching our database.

programming a document to understand if there are several pages

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Cameron - 23 Apr 2007 21:36 GMT
Is there a way to program a document through a button on the document so it
can determine if there is more then one page to print out? I have a templete
with a button on it that when clicked it formats the current page and any
attached documents and prints them. But on certain instances I need the
intial document to print out more then one page. But it would be nice to just
put in an if statement to determine if there are more then one pages to be
printed. If not then it will not if so then it will.

The button code I currently have is as follows:

Application.PrintOut FileName:="", _
   Range:=rRange, _
   Item:=wdPrintDocumentContent, _
   Copies:=1, _
   Pages:="", _
   PageType:=wdPrintAllPages, _
   ManualDuplexPrint:=False, _
   Collate:=True, _
   Background:=True, _
   PrintToFile:=False, _
   PrintZoomColumn:=0, _
   PrintZoomRow:=0, _
   PrintZoomPaperWidth:=0, _
   PrintZoomPaperHeight:=0
   
   Application.PrintOut FileName:="", _
       Range:=rRange, _
       Item:=wdPrintDocumentContent, _
       Copies:=1, _
       Pages:="2-3", _
       PageType:=wdPrintAllPages, _
       ManualDuplexPrint:=False, _
       Collate:=True, _
       Background:=True, _
       PrintToFile:=False, _
       PrintZoomColumn:=0, _
       PrintZoomRow:=0, _
       PrintZoomPaperWidth:=0, _
       PrintZoomPaperHeight:=0
Cindy M. - 26 Apr 2007 12:39 GMT
Hi =?Utf-8?B?Q2FtZXJvbg==?=,

> Is there a way to program a document through a button on the document so it
> can determine if there is more then one page to print out? I have a templete
[quoted text clipped - 4 lines]
> printed. If not then it will not if so then it will.
>  
I'm afraid your requirement isn't very clear. How should the button find out the
number of pages to be printed?

> The button code I currently have is as follows:
>  
[quoted text clipped - 28 lines]
>         PrintZoomPaperWidth:=0, _
>         PrintZoomPaperHeight:=0

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
 
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.