Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Print Spreadsheet to PDF file with Excel 1997

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,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 395
Default Print Spreadsheet to PDF file with Excel 1997

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


"Mathieu Normandeau" wrote:

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,

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
My excel spreadsheet won't print or print preview all the pages? whirlybird Excel Worksheet Functions 2 April 4th 23 10:50 AM
Print Spreadsheet to PDF file vqthomf Excel Programming 1 November 18th 09 10:40 AM
Is there a function to print file name/path on a spreadsheet? cchas80860 Excel Worksheet Functions 4 April 14th 09 02:35 AM
How do I enable macros in a 1997-2003 spreadsheet in Excel 2007 Glen Excel Discussion (Misc queries) 4 October 3rd 07 11:03 PM
How can you print file properties in an Excel spreadsheet? RSG Excel Discussion (Misc queries) 1 February 21st 05 08:33 PM


All times are GMT +1. The time now is 07:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"