PDF document with VBA?

T

Tom

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
 
G

Guest

Did you successfully create the file by doing it manually?

Could it be read then?
 
G

Guest

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.
 

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