![]() |
PDF document with VBA?
Hello
I'd like to create PDF documents with VBA. For this I downloaded the PDF995 writer. I created the following macro: Sub Print_PDF() ActiveSheet.PrintOut _ ActivePrinter:="PDF995 on Ne03:", _ PrintToFile:=True, _ PrToFilename:="C:\Temp\Test.pdf" End Sub The pdf file was created but I'm not able to open it with the Adobe Acrobat Reader. The error message 'unknown format' appears. What am I doing wromg? Tom |
PDF document with VBA?
Did you successfully create the file by doing it manually?
Could it be read then? -- Regards, Tom Ogilvy "Tom" wrote: Hello I'd like to create PDF documents with VBA. For this I downloaded the PDF995 writer. I created the following macro: Sub Print_PDF() ActiveSheet.PrintOut _ ActivePrinter:="PDF995 on Ne03:", _ PrintToFile:=True, _ PrToFilename:="C:\Temp\Test.pdf" End Sub The pdf file was created but I'm not able to open it with the Adobe Acrobat Reader. The error message 'unknown format' appears. What am I doing wromg? Tom |
PDF document with VBA?
PDF995 prompts for a filename: I do not know of a way to default this.
You need to remove PrintToFile:=True, _ PrToFilename:="C:\Temp\Test.pdf" PDF995 prints postscript to a file and then this file is converted to PDF without user interaction. I think "C:\Temp\Test.pdf" contains the postscript: if you want to be sure, you need a ps viewer: GHOSTVIEW is available on the internet. "Tom" wrote: Hello I'd like to create PDF documents with VBA. For this I downloaded the PDF995 writer. I created the following macro: Sub Print_PDF() ActiveSheet.PrintOut _ ActivePrinter:="PDF995 on Ne03:", _ PrintToFile:=True, _ PrToFilename:="C:\Temp\Test.pdf" End Sub The pdf file was created but I'm not able to open it with the Adobe Acrobat Reader. The error message 'unknown format' appears. What am I doing wromg? Tom |
PDF document with VBA?
Yes, I can create it manually.
"Tom Ogilvy" schrieb im Newsbeitrag ... Did you successfully create the file by doing it manually? Could it be read then? -- Regards, Tom Ogilvy "Tom" wrote: Hello I'd like to create PDF documents with VBA. For this I downloaded the PDF995 writer. I created the following macro: Sub Print_PDF() ActiveSheet.PrintOut _ ActivePrinter:="PDF995 on Ne03:", _ PrintToFile:=True, _ PrToFilename:="C:\Temp\Test.pdf" End Sub The pdf file was created but I'm not able to open it with the Adobe Acrobat Reader. The error message 'unknown format' appears. What am I doing wromg? Tom |
All times are GMT +1. The time now is 05:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com