Print Page | Close Window

Merging PDF Documents

Printed From: www.exp-systems.com
Category: PDF reDirect
Forum Name: Programming
Forum Discription: VBA and Batch Tools to control PDF reDirect Pro
URL: http://www.exp-systems.com/Forum_exp/forum_posts.asp?TID=1075
Printed Date: 28 Mar 24 at 8:49AM


Topic: Merging PDF Documents
Posted By: genemacd
Subject: Merging PDF Documents
Date Posted: 19 Jun 12 at 10:10AM
I'm having a problem with the Merge Function of the Active X control.  I've got the control in several clients' program and it works fine in one program (that program is using the old version of  the control).  Currently I'm getting an error "Activex control cannot create object" when attempting to merge 2 documents.  I've been using the control for a long time and it's registered properly and works fine as far as producing PDFs from Access reports. Here's the code I'm using. Function MergePdfFiles is in a class I created for the control.

Public Sub TestMerge()

    Dim MergedFiles(1) As String
    Dim clspdf As New clsPDF_Redirect
   
    MergedFiles(0) = "N:\MyDocs\Vance\Images\_File1_0619125.pdf"
    MergedFiles(1) = "N:\MyDocs\Vance\Images\_File2_0619126.pdf"
    clspdf.MergePdfFiles "N:\MyDocs\Vance\Images\NewFile.pdf", MergedFiles()

End Sub

Function MergePdfFiles(OutputPDF As String, List2Merge() As String) As Boolean

MergePdfFiles = oPDF.Utility_Merge_PDF_Files(OutputPDF, List2Merge())

End Function




Replies:
Posted By: Michel_K17
Date Posted: 19 Jun 12 at 7:30PM
Hi,

   The thing that jumps at me is this line:

Dim clspdf As New clsPDF_Redirect

   Specifically, I do not recognize the clsPDF_Redirect object. I would check that the object is properly referenced (does it exist?).

   I would also recommend to use the latest version of PDF reDirect Pro (it's a free upgrade if you have an old version) and the latest version of the ActiveX as well which is available here:
http://www.exp-systems.com/forum_exp/forum_posts.asp?TID=629

   Otherwise, can you provide more info? It sounds like one program works fine, but not the other, on the same machine. Is that right?

   Hopefully we will be able to make sense of the problem.

   Cheers!




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


Posted By: genemacd
Date Posted: 22 Jun 12 at 1:59PM
I uninstalled/reinstalled PDF reDirect Pro and it works now.


Posted By: Michel_K17
Date Posted: 23 Jun 12 at 1:44PM
Good news! Thanks for letting me know.

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



Print Page | Close Window