Print Page | Close Window

Excel does not print all pages

Printed From: www.exp-systems.com
Category: PDF reDirect
Forum Name: Using PDF reDirect
Forum Discription: Questions and Comments on using PDF reDirect Freeware and Pro
URL: http://www.exp-systems.com/Forum_exp/forum_posts.asp?TID=157
Printed Date: 22 Nov 24 at 7:12AM


Topic: Excel does not print all pages
Posted By: Chriasl
Subject: Excel does not print all pages
Date Posted: 21 Jan 06 at 1:47PM

I am using PDF Redirect to print pages to pdf out of an Excel Makro. It is a code written by Michel_K17 I found in the internet to generate automatically pdfs out of VBA Excel.

But it only prints the first page instead of all 7. When I use PDF Redirect over the Comandbar "Print" it works. How can I change the settings, so the programm prints all pages?



-------------
Chriasl



Replies:
Posted By: Michel_K17
Date Posted: 21 Jan 06 at 2:30PM
Hi,

   I think I have an answer for you. The sample code is like this:

   ThisWorkbook.Sheets(1).PrintOut 1, 1, 1, 0, sPrinter

The parameters are:
  • From: Optional Variant. The number of the page at which to start printing. If this argument is omitted, printing starts at the beginning.
  • To: Optional Variant. The number of the last page to print. If this argument is omitted, printing ends with the last page.
  • Copies: Optional Variant. The number of copies to print. If this argument is omitted, one copy is printed.
  • Preview: Optional Variant. True to have Microsoft Excel invoke print preview before printing the object. False (or omitted) to print the object immediately.
  • ActivePrinter: Optional Variant. Sets the name of the active printer.


So, if you want to print all the pages, I would change that line of code to:
like this:

   ThisWorkbook.Sheets(1).PrintOut , , , , sPrinter

--------- IF THE ABOVE DOES NOT HELP --------

   Here are additional things you can check: Make sure you use the sample code that matches the version of PDF reDirect Pro. There is sample code for v2.1 and sample code for v2.0. You can find and download the correct sample code here:
http://www.exp-systems.com/forum_exp/forum_posts.asp?TID=39&KW=Excel - http://www.exp-systems.com/forum_exp/forum_posts.asp?TID=39&KW=Excel

   If you are trying to print multiple sheets into one PDF, then you need to make sure that all the sheets have the same settings. This is covered in a Microsoft help file on the Internet. All of the details are available here:
http://www.exp-systems.com/forum_exp/forum_posts.asp?TID=31&KW=Excel - http://www.exp-systems.com/forum_exp/forum_posts.asp?TID=31&KW=Excel

   Regards,

Michel


Posted By: Chriasl
Date Posted: 22 Jan 06 at 7:09AM

 It worked, but I changed to

 ThisWorkbook.Sheets(1).PrintOut 1, 7, 1, 0, sPrinter

Thank you very mutch foryour quick reply.


 

 



-------------
Chriasl


Posted By: Michel_K17
Date Posted: 22 Jan 06 at 9:34AM
You are welcome!



Print Page | Close Window