Active Topics Memberlist Search Help | |
Register Login |
Programming | |
EXP Systems Forum : PDF reDirect : Programming |
Topic: Merging PDFs with VBA | |
Page of 2 Next >> |
Author | Message |
oddball508
Newbie Joined: 29 Mar 06 Location: Australia Posts: 4 |
Topic: Merging PDFs with VBA Posted: 29 Mar 06 at 6:46PM |
I have a database of records where each record is for a page of a document. Each page has been scanned to a single page PDF file (let not go into why here :) ) What I would like to do is combine groups of these files into a multi page PDF using code. The front end to reDirect does an excellent job of this but processing 1,003,000 files into 10,000 new files would not be fun. In short - does and one know how I could use the merge function in code? |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 30 Mar 06 at 12:57AM |
Ugh! Glad I'm not in your shoes.
Yes, I think I can help you out. This will require to use some of the "inner library functions" of PDF reDirect. I will write some sample code for you, and send it to you via e-mail. Cheers! Michel Edited by Michel_K17 |
|
IP Logged | |
oddball508
Newbie Joined: 29 Mar 06 Location: Australia Posts: 4 |
Posted: 30 Mar 06 at 5:41PM |
Cool - that would be great.
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 31 Mar 06 at 4:38PM |
Hopefully you have received my e-mail with the sample code. Let me know if you have any questions.
Cheers! Michel |
|
IP Logged | |
oddball508
Newbie Joined: 29 Mar 06 Location: Australia Posts: 4 |
Posted: 02 Apr 06 at 8:26PM |
No email recieved If you sent a zip file it won't get though (needs to be a rar file to keep you firewall happy). Thanks John |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 02 Apr 06 at 9:09PM |
OK. I just re-sent the e-mail with the RAR attachment.
|
|
IP Logged | |
noctifer
Newbie Joined: 26 Jul 06 Posts: 1 |
Posted: 26 Jul 06 at 9:51AM |
Could you send me this sample too?
I would need this functionality too for a report generator which has to generate one pdf out of several documents. Thx in Advance Steve |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 26 Jul 06 at 3:48PM |
Sure! Please wait until next week (Tue or Wed) as I am currently in Northern Canada visiting my parents, and I currently only have Internet access through my cell phone. Cheers! Michel. |
|
IP Logged | |
Commcycle
Newbie Joined: 15 Aug 06 Location: United States Posts: 2 |
Posted: 15 Aug 06 at 3:11PM |
I have a need to append to the end of a .pdf file from MS Access VBA. We are using Access to generate a report that has several sections, each one is a separate report. All go into one .pdf file. Can you send me the Code of "Inner library fuctions". |
|
CommCycler
|
|
IP Logged | |
Commcycle
Newbie Joined: 15 Aug 06 Location: United States Posts: 2 |
Posted: 16 Aug 06 at 11:03AM |
I got the email and followed the instructions. I had to make a few mods in declarations and variable assignment but it works great. This is a huge time saver for me Thanks
|
|
CommCycler
|
|
IP Logged | |
sonic
Newbie Joined: 29 Aug 06 Posts: 1 |
Posted: 29 Aug 06 at 5:31AM |
Hi Michel,
Id love to get that code as well! It'll save me half a day of work.
Thanks!! |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 29 Aug 06 at 8:26PM |
Hi Sonic,
I sent it. Cheers! |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
bhadsock
Newbie Joined: 16 Nov 06 Location: United States Posts: 1 |
Posted: 16 Nov 06 at 11:35AM |
I would also like to receive the sample code or have it posted here. Thanks. |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 16 Nov 06 at 11:39PM |
I have sent you an e-mail with the sample code!
|
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
danii
Newbie Joined: 16 Dec 06 Posts: 1 |
Posted: 16 Dec 06 at 5:13AM |
Hi Michel,
Could you also send me this sample code? It would be very helpful because I also need this functionality to merge several pdfs.
Thx in advance!
Danii
|
|
IP Logged | |
RobertBleasdale
Newbie Joined: 06 Feb 07 Location: United Kingdom Posts: 1 |
Posted: 06 Feb 07 at 6:12PM |
Hi Michel, I am trying to do the same thing, can I get a copy of the code. Thanks!! |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 08 Feb 07 at 12:43AM |
I sent it. Cheers!
|
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
mikegettings
Newbie Joined: 15 Feb 07 Location: United States Posts: 1 |
Posted: 15 Feb 07 at 10:21AM |
Hi, I am attempting to merge pdfs using visual basic code and pdf
redirect and I think It would be a tremendous help if you could forward
the examples along to me.
Thanks in advance. |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 16 Feb 07 at 12:32AM |
Done!
|
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
donkur2
Newbie Joined: 01 Mar 07 Location: Canada Posts: 3 |
Posted: 01 Mar 07 at 1:13PM |
Michel, would you be able to send me, or create a link to the code as well? I need this functionality in order to get the merged files to duplex.
Thanks! :)
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 01 Mar 07 at 9:29PM |
Done!
|
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
donkur2
Newbie Joined: 01 Mar 07 Location: Canada Posts: 3 |
Posted: 06 Mar 07 at 2:16PM |
Thanks Michel, things are going well, but a wrench just got thrown into the project. This is what I need to do: I have a 25 page Access report. On each page is a different item number. The existing pdf diagram that corresponds to that item number exists as a single page file. What I am doing, is I have made a pdf of the entire report, now I need to merge/COLLATE the existing single-page pdf into the appropriate position, ie between pages 1 and 2 of the 25 page report, then between 3 and 4, etc., so that I can print them out duplexed, that is, print the diagram on the back of the page with the item number of it. Is that possible with this software, or do I have to make 25 pdfs from the single report? I guess we could split the file, collate, then merge it back together? Thank-you for any input you may have. :) |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 06 Mar 07 at 10:02PM |
Hi,
OK. I see that what you are asking for is a bit more complicated than the standard merging. What you probably want then is access to a full PDF management library that will allow you to open a PDF, allow you to manage the pages, and then save the changes. I use a library called "QuickPDF" which is normally available here [www.isedquickpdf.com]. The cost is reasonable: $95. However their site has been down for a week or so, and they have not been supporting their library for over a year now. Their web site implies that the owners may be recreating their web site and re-opening soon. Nonetheless, the library is great: it is both fast and powerful. I have setup a "Fan Club" web site which contains a great bunch of users that help each other out. We are located here: [www.quickpdf.org]. Also, we have continued development of the library, fixed bugs, and added a few new features. There is a free 30 day trial period and I can provide you with a trial key if you need it. Just ask. I can probably let you know how to purchase a license even if their site is down, so let me know if that is what you want/need to do. Another alternative is the DynaPDF library which I sell on my web site. It is $399 and that library is fully supported. See my home web site here:[www.exp-systems.com] Apart from that, what you suggested should work: you could print each page individually, and then merge them all at the end in the right order. It might be a touch slower, but it should get you there at the lowest cost. Cheers! |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
crclee
Newbie Joined: 06 May 07 Location: Canada Posts: 1 |
Posted: 06 May 07 at 8:10PM |
Hi
I would also like a copy of the code to merge PDFs using VBA, or perhaps just a one or two-line code snippet here. The new activex seems to have this functionality, but I couldn't find any documentation. I just need to know what arguments to send when calling Utility_Merge_PDF_Files. Thanks C |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 12 May 07 at 10:13AM |
Hi,
Sorry for the late reply: I had not realized that you posted in the forum. Here is the sample code that you requested to use that function: Private Sub Merge() Dim oPDF As New PDF_reDirect_Pro_Tool Dim Files_to_Merge(1) As String Dim TempBool As Boolean ' Files to Upload Files_to_Merge(0) = "C:\Temp\Delme.pdf" Files_to_Merge(1) = "C:\Temp\Buddy Time sign 3001.pdf" With oPDF TempBool = .Utility_Merge_PDF_Files("C:\MergeTest.pdf", 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 Cheers! |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
Rick
Newbie Joined: 12 Jun 07 Location: Netherlands Posts: 5 |
Posted: 12 Jun 07 at 1:35PM |
Hi,
Tried to merge PDF's using the code posted 12 may. However it keeps generating error 0 (dll error 999) even after changing file names or creating new PDF's.
Any options?
Rick
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 14 Jun 07 at 12:58AM |
Hi,
I rechecked the code, and I did not see anything obvious. I am assuming that you have PDF reDirect Pro also installed (some of the libraries that are part of PDF reDirect Pro are needed for the code to run). The sample code that you are running: are you using Word, or Excel? Which version of Windows are you running. Cheers! Michel |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
rctjoe24
Newbie Joined: 14 Jun 07 Location: United States Posts: 1 |
Posted: 14 Jun 07 at 2:55PM |
Michel
I am in also need of the code to join PDFs. My problem is I have multiple access reports that I need to save as pdf files in a directory and then join them as one file. I would do it all in one report but the problem is orientation. One report is portrait and the next landscape and the next portrait and the last back to landscape. This would help a great deal.
Thank you very much
|
|
IP Logged | |
Rick
Newbie Joined: 12 Jun 07 Location: Netherlands Posts: 5 |
Posted: 14 Jun 07 at 2:59PM |
Hi,
Yes, i have PDF reDirect Pro installed and the proper libraries are installed.
I'm running the sample code using word(versions word2000 and wordXPnl).
I'm running winXP and win2000server. The errors are generated on both computers.
Rick
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 15 Jun 07 at 1:44AM |
Hi to rctjoe24,
The code (about 3 posts above) is the latest merging code, but it will be necessary that you download the ActiveX component from [here] so that you get the ActiveX installed and registered. Please note that you can merge more than two PDF files at once. The code shows two files, but you can declare the array to have more than two files, and all of them will be merged together. ----- And also, for you and for Rick too - I think I found the problem with the Error 999 reported by Rick. Please upgrade your ActiveX component with the one you can download from [here]. That should fix the problem. Unzip the DLL to your C:\Program Files\PDF reDirect folder to replace the existing file that is there. You should not have to re-register the component. Simply replacing the DLL should do the trick. Let me know if that does not work. |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
Rick
Newbie Joined: 12 Jun 07 Location: Netherlands Posts: 5 |
Posted: 18 Jun 07 at 8:13AM |
Hi Michel,
Replaced the DLL and it now works on both platforms.
Thanks!
Rick
|
|
IP Logged | |
carpking
Newbie Joined: 08 Jul 10 Posts: 1 |
Posted: 08 Jul 10 at 4:34AM |
Hi Michel,
I have a project that requires splitting a multipage pdf into single page pdfs and then organising them and merging them into multiple pdfs. The organisation process will run according to account numbers which will be saved into the filenames (according to a management sheet in excel) during the splitting process ... eg pages 1-5 filenames: acc1 pg1, acc1 pg2, acc1 pg3, acc1 pg4, acc1 pg5 ... pages 6-8 filenames acc2 pg1, acc2 pg2 ... etc I have a moderate knowledge level of vba in excel and I was hoping based on the comments above you would be able to help me with this project.
Many thanks in advance
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 08 Jul 10 at 10:34PM |
Hi there,
I think you can get there with PDF reDirect, but honestly, you will be better served by using the same PDF library that I use in PDF reDirect. It is called QuickPDF Library, and you can find out more about it [here]. In regards to "helping" with your project: unfortunately I do not offer this service for free. In addition, I am currently fully booked. However, you might be able to get some help by asking for some help from a professional programmer at www.vworker.com. You can post what you need as a small project. I think you will find the rates quite reasonable. I hope that helps. Cheers! |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
arasu
Newbie Joined: 25 Aug 10 Location: Bhutan Posts: 3 |
Posted: 25 Aug 10 at 3:23PM |
hi michel,
when i am trying to run this code it showing the error as "Active x component can not find the object". the error is coming when i am running this line "TempBool = .Utility_Merge_PDF_Files("C:\MergeTest.pdf", Files_to_Merge). Please let me know what i have to define in the Files_to_merge... and please help me to solve this issue... regards, arasu |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 26 Aug 10 at 12:22AM |
Hi Arasu,
You are right: it looks like I deleted the sample code for merging PDF files together. Sorry about that. Here it is: Dim oPDF As New PDF_reDirect_v25001.Batch_RC_AXD Dim Files_to_Merge(1) As String Dim TempBool As Boolean ' Files to Upload Files_to_Merge(0) = "C:\Temp\FirstFile.pdf" Files_to_Merge(1) = "C:\Temp\SecondFile.pdf" With oPDF TempBool = .Utility_Merge_PDF_Files("C:\MergeTest.pdf", 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 Also note that you can make teh array larger so taht you can merge 3, 4, or more files together. Cheers! |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
arasu
Newbie Joined: 25 Aug 10 Location: Bhutan Posts: 3 |
Posted: 26 Aug 10 at 4:29PM |
Hi Michel,
Thanks for your quick response... The same code only i copied and used to merge my pdf.But still i am getting error as "Active X component cant create object" when i am running this particular line TempBool = .Utility_Merge_PDF_Files("E:\Learnings\mergetest.pdf", Files_to_Merge) Please help me to solve this problem... Private Sub Merge() Dim oPDF As New PDF_reDirect_Pro_Tool Dim Files_to_Merge(1) As String Dim TempBool As Boolean ' Files to Upload Files_to_Merge(0) = "E:\Learnings\1.pdf" Files_to_Merge(1) = "E:\Learnings\2.pdf" With oPDF TempBool = .Utility_Merge_PDF_Files("E:\Learnings\mergetest.pdf", 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 |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 26 Aug 10 at 10:29PM |
Hi,
Thanks for the update. I found a bug in my code (my bad). I will post an updated version of the component later tonight. It will be v2.5.2. Hopefully this will get you going. Cheers! Michel |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 27 Aug 10 at 12:39AM |
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 27 Aug 10 at 12:43AM |
For the sake of completeness, your reference to the ActiveX component changes as follows:
WAS: Dim oPDF As New PDF_reDirect_Pro_Tool NEW: Dim oPDF As New PDF_reDirect_v25002.Batch_RC_AXD Your code had the old reference - which is why you were getting the error message in the first place. But you also need the bug fix for v2.5.2 Cheers! Michel |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
arasu
Newbie Joined: 25 Aug 10 Location: Bhutan Posts: 3 |
Posted: 27 Aug 10 at 3:32PM |
Hi Michel,
Now the code is working fine.. Thanks for your help... I have a small doubt in the product, here we have two product one is PDF-redirect free version... and another one is PDF- redirect Professional version. These are my doubts. 1. The PDF-redirect free version is free only for 90 days after that i ll get a pop up message...or some word will come background of my pdf... Am I correct??? 2. This VBA code will work only for PDF-redirect Professional only not for Free version ...is this correct??Because the dll which i downloaded is for Professional only pls correct me!!! 3. The DLL Active X component which i downloaded is for the Professional not for the free version.. correct?? Thanks in advance Regards, Arasu |
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 27 Aug 10 at 7:07PM |
Hi,
Here are the answers to your questions: 1. PDF reDirect Freeware is free, forever. No popups, no warnings. Just free. 2. PDF reDirect Pro is free for 90 days, then continues to work, but the PDF files have a watermark added to all the pages that says "www.exp-systems.com". 3. You are correct: the VBA samples and the ActiveX DLL require the Pro version. One final point: PDF reDirect Pro is $19.99, but the price is reduced to $14.99 for August only, and will go back to $19.99 on September 1st at 1AM Eastern Standard Time. Cheers! Michel |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
jmckelvey
Newbie Joined: 15 Mar 11 Location: Canada Posts: 2 |
Posted: 15 Mar 11 at 2:20PM |
First off... fabulous product!
licensed Pro 2.5.2 with ActiveX file ver 2.5.0.2
Our only issue is when merging 3 pdf documents into 1 using VBA in Access, only the first 2 are processed (3rd is ignored). Sample code was modified to:
Dim Files_to_Merge(2) as string {was 1}
Files_to_Merge(2) = "Page_3.pdf" {newly inserted line}
Process completes, "Merge Successful", but never processes the 3rd PDF
Any thoughts?
I know I could merge 1 and 2 and then the result with 3 but...
Thanks!
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 15 Mar 11 at 9:40PM |
Hi,
It sounds like it should work. Make sure that Page_3.pdf is not encrypted, or try changing the order, place "Page_3.pdf" first to see if the problem is with that file. Also, "Page3_.pdf" should actually contain the full path like this: Files_to_Merge(2) = "C:\Temp\Page_3.pdf" It should work (I have sample code that works that does more than two documents), so I would check the obvious things first. let me know if the problem continues. Cheers! |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
jmckelvey
Newbie Joined: 15 Mar 11 Location: Canada Posts: 2 |
Posted: 16 Mar 11 at 12:21PM |
Thanks for the reply!
I was working multiple angles at the time... discovered I had missed the PDFcreated() delay/check on page3. Merge was completing before page 3 had been written and released; albeit, no error from the merge function.
It's not really a bad thing when things run too fast!
GREAT PRODUCT!
Thanks again!
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 17 Mar 11 at 12:50AM |
Awesome! Thanks for the update, and for your kind words.
Cheers! |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
alaska-guy
Newbie Joined: 20 Jul 11 Posts: 4 |
Posted: 20 Jul 11 at 4:03PM |
Michel - I am using your merge code in an Access 2007 database front end SQL server backend (ODBC) I have installed the proper libraries and modifed the first line of code so I no longer recive the error "Active x component can not find the object". Now no matter what I do I keep getting the error 410 - One of the Input File could not be decrypted -Any ideas that you can give me on avoiding this error would be greatly appreciatedThanks -AKG
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 22 Jul 11 at 6:52AM |
Hi,
What is th 1st line that was giving the error? Was it "Option Explicit"? If so, that line really needs to be there. What this tells me is that for some reason, the ActiveX component is not registered properly on your system. I would look at manually registering the component by using the regsvr32 command line command. I hope that helps. Cheers! |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
alaska-guy
Newbie Joined: 20 Jul 11 Posts: 4 |
Posted: 22 Jul 11 at 5:18PM |
Hi Michel,
Am I missing something? This is the code I am using: Dim oPDF As New PDF_reDirect_v25002.Batch_RC_AXD Dim Files_to_Merge(1) As String Dim TempBool As Boolean ' Files to Upload Files_to_Merge(0) = "T:\SystemDocuments\1143.pdf" 'Files_to_Merge(1) = "C:\MergeeTest.pdf" With oPDF TempBool = .Utility_Merge_PDF_Files("T:\1144.pdf", 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 My Acesss module is set to option explicit but there is no option explicit in the code that I saw on the forum - Am I missing some code? Anyway I sucessfully manually registered the activeX dll ActiveX_PDF_Pro_v25002.dll and I still receive the following error only from the line: TempBool = .Utility_Merge_PDF_Files("T:\1144.pdf", Files_to_Merge) An Error Occured: One of the Input File could not be opened or decrrypted Error Number = 0 DLL Error Number = 401 This merge process will be a life saver for my e-document app so I really want it to work - The manual merge works fine in the pdf Redirect application so my pdf files should be OK Here is hoping that you can give me more enlightenment - I don't see what I can change based on the code that I am using |
|
IP Logged | |
alaska-guy
Newbie Joined: 20 Jul 11 Posts: 4 |
Posted: 22 Jul 11 at 5:58PM |
Michel,
Trying to be more specific - I am not actually receiving a classic error from my code - I am only returning a value from the call to the merge utility that branches into a message box with the error content in the If Not TempBool Then statement. I added error handlers and did not trap any errors
|
|
IP Logged | |
Michel_K17
Moderator Group Forum Administrator Joined: 25 Jan 03 Posts: 1673 |
Posted: 25 Jul 11 at 8:22AM |
Hi,
Here is the explanation. You have this: Dim Files_to_Merge(1) As String So you will have two dimensions: Files_to_Merge(0) and Files_to_Merge(1) But later in your code, you have this: ' Files to Upload Files_to_Merge(0) = "T:\SystemDocuments\1143.pdf" 'Files_to_Merge(1) = "C:\MergeeTest.pdf" You have commented out the 2nd line for Files_to_Merge(1) which means it will be empty - which is causing the error. Cheers! |
|
Michel Korwin-Szymanowski
EXP Systems LLC |
|
IP Logged | |
Page of 2 Next >> |
Forum Jump |
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |