Getting "Save as PDF File" Dialog at end of printing to PDF using PDFwriter

C

Chuck Reed

I have a project where I'm using VBA to update multiple excel
workbooks and creating custom copies of the workbooks as PDF files.
The custom copies of the workbooks are customized by what sheets and
individual wants to see. I have successfully used PDFwriter to
suppress the "Save as PDF File" dialog by programatically changing the
registry entries for PDFFileName, bExecViewer and bDocInfo and using
the printOut method of excel to get what I need. This works well for
all but two of the workbooks. These two workbooks create the PDF files
as programmed but at the end of the print to PDF before control
returns to the VBA code, the "Save as PDF File" dialog pop's up. I
acts as if either PDFwriter or Excel does not recognize that it had
already output a PDF copy of the workbook.

This is anoying as I have not been able to figure out what is
triggering the dialog box to pop up after the print to PDF is
complete. Has anyone experienced this or have any possible solutions
for this situation? I'm using Excel 2000 and Acrobat 5.0.
 
D

Dave Peterson

First, I don't use pdfmaker--if the dialog's caption isn't "save as PDF File",
then you may want to run your macro once more and type it in exactly.

And a silly wild guess...Any chance that the file you're creating already exists
and your code asks to confirm overwriting?

If yes, then maybe you can just delete the existing file(s) first.

Look at Kill in VBA's help.
 
C

Chuck Reed

Dave,

Thanks for the advice. I have confirmed that files do not exist as I
create a new directory just prior to printing to a PDF file.

Somehow the either excel or Acrobats PDFwriter doesn't recognize that it
has just completed creating the pdf file prior to displaying the "Save
As PDF File" Dialog. I'm wondering if there is something or some
property of the particular workbooks that I am replicating as PDF's that
is causing this strange behavor.

Chuck
 
D

Dave Peterson

Sorry, I can't help (and that my guess didn't pan out).

Maybe a pdfwriter user can chime in.
 
C

Chuck Reed

I still haven't figured out how to identify the cause of these two
excel workbooks not behaving as the others. I've been trying to find a
programatic method to bypass the "Save as PDF File" dialog from coming
up after PDFWriter has printed the excel sheets selected to a PDF
File. I can see the registry entries clear after the first pass of
printing, then It just starts over again with print process again. I
haven't found a way to intervene between the first print and the
second.

If anyone's got clue as to what I ought to try next or if anyone's ran
into a similar situation with an excel workbook misbehaving in this
manor, I sure would like to hear from you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top