+ Reply to Thread
Results 1 to 6 of 6

Printing a .pdf of a spreadsheet

  1. #1
    Registered User
    Join Date
    01-20-2010
    Location
    Clearwater, FL
    MS-Off Ver
    Excel 2003
    Posts
    9

    Printing a .pdf of a spreadsheet

    I am printing a .pdf of a spreadsheet with a macro, using Bullzip PDF Printer. Here's the code (in Excel 2003 VBA) that I'm using:
    Application.ActivePrinter = "Bullzip PDF Printer on Ne05:" 'Chooses BullZip PDF printer for printing
    Selection.PrintOut Copies:=1, ActivePrinter:="Bullzip PDF Printer on Ne05:" 'Prints .pdf
    My problem is that I need commands to a) Save the .pdf when that dialog appears (just an Enter key on keyboard does it); b) Overwrite the existing .pdf when that dialog appears (Enter key again); c) Close the .pdf file once it's displayed (File - Exit?). I've tried using
    "Application.SendKeys ("[ENTER}") and that does not work. Nothing happens when the macro reaches that command.

    Thanks for any help available,
    Bill Chandler

  2. #2
    Valued Forum Contributor
    Join Date
    11-20-2012
    Location
    Seattle, WA USA
    MS-Off Ver
    Excel 2010
    Posts
    597

    Re: Printing a .pdf of a spreadsheet

    i noticed you have a typo in your Application.SendKeys command, i'm guessing that was from transcribing it to the forum post

    if that's not it, i will look into it, i'm not 100% sure about the solution though

  3. #3
    Registered User
    Join Date
    01-20-2010
    Location
    Clearwater, FL
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Printing a .pdf of a spreadsheet

    Thanks for reply.

    I corrected that typo before trying it.

  4. #4
    Registered User
    Join Date
    01-20-2010
    Location
    Clearwater, FL
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: Printing a .pdf of a spreadsheet

    Hello? Can anyone help with this pdf print in Excel 2003?

  5. #5
    Registered User
    Join Date
    02-28-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    1

    Re: Printing a .pdf of a spreadsheet

    Hi, if you want quick efficient printouts to bullzip I recommend runing a batch file to wich you can pass several parameter.
    here is how I created one for myself:

    Open "X:\yourpath\a.bat" For Output As #File01
    Print #File01, "SET CONFIG=C:\Program Files\Bullzip\PDF Printer\API\EXE\config.exe"
    Print #File01, """%CONFIG%"" /C"
    Print #File01, """%CONFIG%"" /S Output """ & filename & """" this is to set your filename
    Print #File01, """%CONFIG%"" /S ShowSaveAS never" this keeps the popups down
    Print #File01, """%CONFIG%"" /S ShowSettings never" this keeps the popups down
    Print #File01, """%CONFIG%"" /S ShowPDF no" this keeps the popups down
    Print #File01, """%CONFIG%"" /S ConfirmOverwrite yes" this keeps the popups down
    Close #File01
    Shell ("X:\yourpath\a.bat")
    then you can actually print
    Application.ActivePrinter = "Bullzip PDF Printer sur Ne05:" and so on...

    as is it is open looped in the sense that would there be an error, you would not be informed. You have to check that the file was done.
    I have a small issue though with my printer name: it sometimes increments my Ne05: to Ne06 then Ne07 ... Every so often I change the code ...

  6. #6
    Registered User
    Join Date
    09-05-2012
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Printing a .pdf of a spreadsheet

    Quote Originally Posted by bchandz View Post
    I am printing a .pdf of a spreadsheet with a macro, using Bullzip PDF Printer. Here's the code (in Excel 2003 VBA) that I'm using:
    Application.ActivePrinter = "Bullzip PDF Printer on Ne05:" 'Chooses BullZip PDF printer for printing
    Selection.PrintOut Copies:=1, ActivePrinter:="Bullzip PDF Printer on Ne05:" 'Prints .pdf
    My problem is that I need commands to a) Save the .pdf when that dialog appears (just an Enter key on keyboard does it); b) Overwrite the existing .pdf when that dialog appears (Enter key again); c) Close the .pdf file once it's displayed (File - Exit?). I've tried using
    "Application.SendKeys ("[ENTER}") and that does not work. Nothing happens when the macro reaches that command.

    Thanks for any help available,
    Bill Chandler
    If you want to persist with using SendKeys rather than the batch file method mentioned above by patsauve, the relevant commands are:

    Please Login or Register  to view this content.
    These work for me albeit using a diferent PDF writer to your one.

    By the way "Filename" on the second line is a string variable from earlier in my code and is what I want to call the newly created PDF file.

    The wait command required may vary from system to system but seemed to be what my one needed so it didn't miss a command.

    Hope this helps.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1