Print Page | Close Window

Access Report + PDFs + Word Docs + PNGs

Printed From: www.exp-systems.com
Category: PDF reDirect
Forum Name: Using PDF reDirect
Forum Discription: Questions and Comments on using PDF reDirect Freeware and Pro
URL: http://www.exp-systems.com/Forum_exp/forum_posts.asp?TID=2199
Printed Date: 22 Nov 24 at 7:54AM


Topic: Access Report + PDFs + Word Docs + PNGs
Posted By: lance
Subject: Access Report + PDFs + Word Docs + PNGs
Date Posted: 07 May 15 at 4:59PM
Hey all,

Thanks for this tool I just found it last night and I have made it work successfully but I am new to access and expanding its functionality is hurting my brain.

The code to merge PDFs is at the bottom of a report I created. In this report it will look through the records and return multiple PDFs to merge. However, i'm not sure how I could add the report itself into the merged files? Files_To_Merge() is growing based on the amount of records it matches. If possible I would also need to merge .docx and .png files.

Files needed to be merged and in order:
Report that opens first
multiple PNGs
multiple PDFs it finds during the report_load
one .docx

ReDim Preserve Files_to_Merge(0 To UBound(strCharts))
                        Files_to_Merge(UBound(strCharts)) = GetDBPath & "Storyboards" & "\" & rs1![Program] & "\" & rs1![Customer] & "\" & rs1![AuthCode] & ".PDF"

Dim strFilePath As String
strFilePath = GetDBPath & "Storyboards" & "\" & Me.Program & "\" & CustomerName & "\"

    With oPDF
     TempBool = .Utility_Merge_PDF_Files(strFilePath & CustomerName & " Completed Storyboard", Files_to_Merge)

        If Not TempBool Then
             'NOTES ON ERROR CODES for oPDF.ErrorLastDLL
             '401 - One of the Input File could not be opened
             '410 - One of the Input File could not be decrypted
            MsgBox "An Error Occured: " & .LastErrorDescription & vbCrLf & _
                     "Error Number =" & Str$(.LastErrorNumber) & vbCrLf & _
                     "DLL Error Number =" & Str$(.ErrorLastDLL), _
                     vbExclamation
        Else
            MsgBox "Merge Successful.", vbInformation
        End If
    End With
    Set oPDF = Nothing

End Sub


Tl;dr

How can I add the current loaded report into th beginning of my Files_to_Merge array and add some PNGs and docx files to the end of the array.



Replies:
Posted By: Michel_K17
Date Posted: 07 May 15 at 5:16PM
Hi Lance,

Unfortunately, PDF redirect only merges PDF files, and does not merge Word or PNG documents. You can try to use the Windows Command Line "print" verb to direct these to a PDF Batch printer for auto-conversion, and then you could merge them, but we are talking about some fairly significant code, some of which I included in the VB6 example.

Sorry, I realize I am not being much help here, but that's the best I can do at this time.

Best,


-------------
Michel Korwin-Szymanowski
EXP Systems LLC



Print Page | Close Window