Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Using PDF reDirect
 EXP Systems Forum : PDF reDirect : Using PDF reDirect
Topic: Excel does not print all pages Post Reply Post New Topic
Author Message
Chriasl
Newbie
Newbie


Joined: 21 Jan 06
Location: Austria
Posts: 2
Quote Chriasl Replybullet Topic: Excel does not print all pages
    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
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet 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

   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

   Regards,

Michel
IP IP Logged
Chriasl
Newbie
Newbie


Joined: 21 Jan 06
Location: Austria
Posts: 2
Quote Chriasl Replybullet 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
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 22 Jan 06 at 9:34AM
You are welcome!
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum