+ Reply to Thread
Results 1 to 4 of 4

PDF document with VBA?

  1. #1
    Tom
    Guest

    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



  2. #2
    Tom Ogilvy
    Guest

    RE: 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
    >
    >
    >


  3. #3
    AA2e72E
    Guest

    RE: 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
    >
    >
    >


  4. #4
    Tom
    Guest

    Re: PDF document with VBA?

    Yes, I can create it manually.


    "Tom Ogilvy" <[email protected]> schrieb im Newsbeitrag
    news:[email protected]...
    > 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
    >>
    >>
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1