PDA

View Full Version : Solved: Number of Print Pages



GMan
08-22-2006, 09:48 AM
Hopefully this is an easy one....

I am setting up a script that creates a report and then gives the user the option to print it. However, I wan't to check the number of pages before it is sent to the printer. This way I can alert the user that the report will be over XX Number of pages.

Obviously, if the report is small it will just print. But depending on the data requested the report can range from 2 pages to over 50 pages.

Is there a property that will show the number of pages the report will print on before sending it to the printer?

Thanks!

Pinokkio
08-22-2006, 10:29 AM
http://www.j-walk.com/ss/excel/tips/tip65.htm

P.

Pinokkio
08-22-2006, 10:41 AM
Hi GMan,


try this line in a sub:

MsgBox ExecuteExcel4Macro("Get.Document(50)")

Greetings
P.

GMan
08-22-2006, 11:17 AM
Thanks Pinokkio!!! this is exactly what I was looking for.

Pinokkio
08-22-2006, 11:44 AM
gladly that I could help
P.

mdmackillop
08-22-2006, 01:02 PM
Hi Pinokkio,
Welcome to VBAX.
Great to someone start straight off with an answer.:clap:
Regards
MD