Results 1 to 12 of 12

Automation of creating PDF files

Threaded View

  1. #1
    Registered User
    Join Date
    06-23-2009
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    7

    Automation of creating PDF files

    We are trying to automate the creation of PDF files for each sheet in an Excel file,a nd keep getting error messages. Can someone help? It produces the post script file, but it has no data nd then doesn't create a PDf file at all. We have Excel 2003, and have the below code setup.

    Set appDist = New cAcroDist
                Sheets("CAD Roll").Select
                InputPSFileName = "\\nanflp03\cola\123g\coladmin\Dreamweaver\New Albany CMA\Reports\Today\RollCAD.ps"
                OutPutPDFFileName = "\\nanflp03\cola\123g\coladmin\Dreamweaver\New Albany CMA\Reports\Today\RollCAD.pdf"
                Application.ActivePrinter = "Acrobat PDFWriter on LPT1:"
                ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
                "Acrobat PDFWriter on LPT1:", PrintToFile:=True, Collate:=True, PrToFileName:="\\nanflp03\cola\123g\coladmin\Dreamweaver\New Albany CMA\Reports\Today\RollCAD.ps"
                Call appDist.odist.FileToPDF(InputPSFileName, OutPutPDFFileName, sjobOptions)
                Kill InputPSFileName
    We also have a class module setup called cAcroDist with the below code.

    Option Explicit
    
    Public WithEvents odist As PdfDistiller
    
    Private Sub Class_Initialize()
    Set odist = New PdfDistiller
    End Sub
    Last edited by mkern21; 06-25-2009 at 09:10 AM. Reason: edit code

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