Quantcast
Viewing all articles
Browse latest Browse all 2632

VBA code for merging pdf files stopped working with new version PDFCreator

@eds1 wrote:

Hello all, I am new to this forum and I would like some help. Some years ago I developped an Access application where pdf's are merged. I used the following code. It worked perfectly until a new version of PDFCreator was installed. Version 1.7.1 was replaced by the most recent version 2.5.2.
Now I get an error on CreateObject("pdfforge.pdf.pdf").
Advice please...

Function MergePdfs(MergedFileFullPathString As String, oud As String, nieuw As String) As Boolean

Dim PdfDoc As Object
Dim FilesToMergeArrayObject(1) As Variant
Set PdfDoc = CreateObject("pdfforge.pdf.pdf")
On Error GoTo LogError
FilesToMergeArrayObject(0) = oud
FilesToMergeArrayObject(1) = nieuw
On Error GoTo LogError
PdfDoc.MergePDFFiles_2 FilesToMergeArrayObject, MergedFileFullPathString, True
MergePdfs = True

Cleanup:
Set PdfDoc = Nothing
Exit Function

LogError:
MergePdfs = False
Call LogError(Err.Number, Err.Description, "MergePdfs()")
Resume Cleanup

End Function

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 2632

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>