Print Spreadsheet to PDF file with Excel 1997

M

Mathieu Normandeau

Hi,
A server has Excel 1997 installed and cannot be upgraded for compatibility
reason.
I need to automated a process to create a PDF file (with a printer driver).
The printer driver need the parameter "Print to file name" (PrToFileName).
It seem that the printout function does not have that parameter in Excel 1997.

Is there any way I can do it?

Thanks,
 
K

ker_01

The best approach may depend on the printer driver itself (is it Adobe, and
if so what version, etc.).

However, there is a simple solution that I used back when I was on 97 and (I
think) Adobe 4(?).

I couldn't force an output name, so I sent the file to the print driver, set
a timer for 5 seconds (which was long enough for my document(s) to process),
then I just renamed the file- I already knew what directory it was going to
land in, and the filename was the standard PDF output name (whatever that
was).

Name C:\standardname.pdf C:\MyPath\Myfilename.pdf

where you would presumably hardcode the first path and filename, then use a
constant for your new path, and a variable for your new filename, so
something more like

Constant StandardName = "C:\StandardName.pdf"
Constant MyNewPath = "C:\My Analytics\"
Constant pdfextension = ".pdf"

for i = 1 to 3
'insert a timer that is long enough to produce your file on your PC
MyFileName = "Here is my filename " & i & pdfextension
Name Standardname MyNewPath & MyFilename & pdfextension
Next i

HTH,
Keith
 

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