Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Please bear with me I know that this has been talked about previously. I am trying to write a macro that runs automatically every sunday and then prints multiple worksheets to pdf. I am able to put the code in that works without a specific file name but everytime I put a destination filename in and try to open the file it says it is a corrupted. These are weekly market files which will always be saved in the same spot so I don't need to have a user pass a file name. Any help is appreciated. Thanks, -- cooter24 ------------------------------------------------------------------------ cooter24's Profile: http://www.excelforum.com/member.php...o&userid=29619 View this thread: http://www.excelforum.com/showthread...hreadid=537883 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
All dozen or so PDF printers I have tested print in two passes: in the first
pass, they create a PostScript file and in the second, they create the PDF document. I imagine that you are specifying a file name (with extension PDF) to which to print; ADOBE is printing the PostScript to it and stopping; that PDF is not in the PDF format but contains PostScript- hence, it is seen as corrupt. Don't specify a filename. As far as I know, there is no way of bypassing the prompt for the filename. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
cooter24,
To add to the others, from what I understand (but I may be wrong...): Printing to file gives you a .ps file not a .pdf, despite the fact that you have given it a .pdf extension. The resulting file can be processed by Distiller to give a real .pdf file. You can see this by opening the apparent .pdf in a text editor and comparing it to a "real" .pdf file. The easiest way is to by pass this and create a .pdf directly, so forget the printToFile and filename The name of the workbook will be used for the file name and the destination folder will be dependent on the port, as shown in the PrintersAdobe PDFPropertiesPorts. You can add another port if you want another location. There are other settings in the pdf print driver that may interfere with this, one being "Prompt for Adobe PDF filename" which you need to uncheck. NickHK "cooter24" wrote in message ... Please bear with me I know that this has been talked about previously. I am trying to write a macro that runs automatically every sunday and then prints multiple worksheets to pdf. I am able to put the code in that works without a specific file name but everytime I put a destination filename in and try to open the file it says it is a corrupted. These are weekly market files which will always be saved in the same spot so I don't need to have a user pass a file name. Any help is appreciated. Thanks, -- cooter24 ------------------------------------------------------------------------ cooter24's Profile: http://www.excelforum.com/member.php...o&userid=29619 View this thread: http://www.excelforum.com/showthread...hreadid=537883 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
can't print to adobe acrobat | Charts and Charting in Excel | |||
excel/vba & acrobat 7.0 pro - Print multiple sheets to 1 PDF | Excel Programming | |||
Print Acrobat Reader PDF file from VBA | Excel Programming | |||
how to re install Adobe Acrobat in Excel? The adobe Acrobat work. | Excel Discussion (Misc queries) | |||
Print to Adobe Acrobat (2 ws to one file) | Excel Programming |