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 :-)