Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Programming
 EXP Systems Forum : PDF reDirect : Programming
Topic: Merging PDF Documents Post Reply Post New Topic
Author Message
keithcrowdy
Newbie
Newbie


Joined: 28 Dec 11
Location: United Kingdom
Posts: 5
Quote keithcrowdy Replybullet Topic: Merging PDF Documents
    Posted: 28 Dec 11 at 10:57AM

Hi,

I have only just come across PDF Redirect, I am trying to write a small VBA Application that sits in Excel 2010. I am using Excel to pull in data from other excel spread sheets and then once down I am opening an Word template and populating it.

This I have got working, what I then need to do is save the Word document as a PDF and then merge a number of Manufacturers PDF Datasheets to the rear of my document as appendices.

This was where I got stuck and came across PDF Redirect, so I downloaded and registered for the full addition.
Gong t through some of the articles on the site there are a number of other people doing the same, but I can't seem to see how to do this. So any assistance would be greatly appreciated

Thanks

KeithConfused
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 28 Dec 11 at 11:27AM
Hello Keith,

   Have you also downloaded and installed the PDF reDirect ActiveX component for programmers? This download also includes an Excel VBA sample that gives sample code for merging PDF files.

   It's available [here].

   Cheers!


Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
keithcrowdy
Newbie
Newbie


Joined: 28 Dec 11
Location: United Kingdom
Posts: 5
Quote keithcrowdy Replybullet Posted: 30 Dec 11 at 12:36PM
Michel,

I have produced the following code: in my Excel Spreadsheet:
Private Sub cmdPDFBatch()
    
    Dim oPDf As New PDF_reDirect_Pro_Tool
    Dim DestFolder As String
    Dim PDF(10) As String
    DestFolder = Cells(11, 5)
        For i = 68 To 80
            If i < 74 And i > 75 Then
                PDF(i - 68) = Cells(i, 6)
            End If
        Next i
    oPDf.Utility_Merge_PDF_Files DestFolder, PDF

End Sub

What I have is, in the cells (68,6) to (80,6) is the path of the pdf's I need to merge and in Cells(11,5) I have where it is to be saved to.

When I run the code I get "Run Time error '429'.. ActiveX Component can't creat object.

Any Ideas what I am doing wrong?






IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 31 Dec 11 at 5:30PM
Hi,

   Error 429 is saying that you do not have a reference made to the DLL in your VBA Excel project. You can do this by going into the VBA IDE, and then going into Tools >> References >> and selecting "PDF reDirect Remote Control".

   If the above does not work, try the following:
  1.  Look to make sure that the ActiveX DLL (ActiveX_PDF_Pro_v25002.dll) is located in the following folder: C:\Program Files (x86)\PDF reDirect.
  2. If it is not there, then you might find it here: C:\Program Files (x86)\PDF reDirect\ActiveX. If it is there, then move it to: C:\Program Files (x86)\PDF reDirect
  3. Register the ActiveX manually using the Regsvr32 command as follows:
    • Open a Command Prompt. In Windows 7, you can type "cmd" in the Search box, and then right-click on "cmd.exe" and select "Run As Administrator".
    • In the command prompt, type the following:
      • C:\regsvr32.exe "C:\Program Files (x86)\PDF reDirect\ActiveX_PDF_Pro_v25002.dll"
    • A message will come up saying that "DllRegisterServer ActiveX_PDF_Pro_v25002.dll succeeded"
  4. Go back to the Excel VBA IDE, and try again to add a reference to the ActiveX DLL.
   Hopefully this will do the trick for you.

   Cheers!



Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
keithcrowdy
Newbie
Newbie


Joined: 28 Dec 11
Location: United Kingdom
Posts: 5
Quote keithcrowdy Replybullet Posted: 01 Jan 12 at 5:52AM

Hi,

Looking in C:\Program Files (x86)\PDF redirect I have “ActiveX_PDF_Pro.dll” but not “ActiveX_PDF_Pro_v25002.dll”

When I look at it properties I see it is version 2.2.06

I don’t have a sub-directory “ActiveX”

I have currently:

·         Quick PDF Library 7.18

·         PDF_reDirect_2500

·         PDF redirect Pro Remote Control

Referenced in Excel

So I assume I have the correct DLL registered? or have I?

Thanks


Keith

IP IP Logged
keithcrowdy
Newbie
Newbie


Joined: 28 Dec 11
Location: United Kingdom
Posts: 5
Quote keithcrowdy Replybullet Posted: 01 Jan 12 at 7:24AM
Hi again,

moving forward albeit slowly - Found one problem my batchprinter hadn't installed correctly. Got that sorted now.

Now the code is  recognised, however when it runs it is coming up with

Run Time error '429' -ActiveX component can't create object" - I am running Windows 7 X64 but I running office 2010 X86

Keith
IP IP Logged
keithcrowdy
Newbie
Newbie


Joined: 28 Dec 11
Location: United Kingdom
Posts: 5
Quote keithcrowdy Replybullet Posted: 01 Jan 12 at 11:06AM
I have done a re-install and now have “ActiveX_PDF_Pro_v25002.dll" in the directory and have registered it.

So now the line "Dim oPDF As New PDF_reDirect_Pro_Tool" needs updating so I changed it to "Dim opdf As New PDF_reDirect_v25002"
and it came up with a comile error: Expected user defined type, not project

IP IP Logged
ArnoldLee
Newbie
Newbie


Joined: 14 Mar 12
Location: United States
Posts: 1
Quote ArnoldLee Replybullet Posted: 14 Mar 12 at 3:42PM
whether its to cut down on folder clutter or speedily send a single attachment, merging separate PDF files into a single document is a snap. -Tire Works


IP IP Logged
Post Reply Post New Topic
Printable version Printable version

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