MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Excel macro - print to file


Posted by Sandy on July 17, 2001 1:29 PM

We're using MS Office 97, SR2. We're looking to take an entire spreadsheet and save it as postscript file to a particular directory. The code we're using is below. The problem is that it only saves the entire spreadsheet some of the time. The other times it saves just the worksheet. How can we get it to be consistent with saving the entire workbook as a postscript file?


Posted by Barrie Davidson on July 17, 2001 2:55 PM

Hi Sandy, I'm not familiar with a postscript file. Is it possible that those files that save okay only contain one worksheet? When I am saving spreadsheets in certain formats Excel will only save the current worksheet.

Barrie

Posted by Sandy on July 18, 2001 3:19 PM


That's something we can check but my first thought is no. Basically what we are doing once the spreadsheet is completed, instead of saying File/Save As, we are doing File/Print and selecting the appropriate print driver which has been setup to print to a file; instead of a LPT port. Doing the process manually seems to always work but users would rather have it setup as a macro. From what little I know of Excel, the code looks right but again, doesn't work consistently.

Appreciate any further comments/suggestions!

Sandy