Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
Programming
 EXP Systems Forum : PDF reDirect : Programming
Topic: Merging PDFs with VBA Post Reply Post New Topic
<< Prev Page  of 2
Author Message
alaska-guy
Newbie
Newbie
Avatar

Joined: 20 Jul 11
Posts: 4
Quote alaska-guy Replybullet Posted: 28 Jul 11 at 1:48PM
Yes  - You do need two files in order to merge! - Did the commenting when I had the first problem and forgot to remove - Sorry should have caught that myself
Works perfectly now - Thanks 
IP IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 29 Jul 11 at 1:32AM
No worries. Smile

Cheers!
Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
mytfein
Newbie
Newbie


Joined: 14 Feb 12
Posts: 1
Quote mytfein Replybullet Posted: 14 Feb 12 at 4:11PM
Hi Michel,
 
Would it be possible for you send me the code, as well.
 
I need to consolidate pdf files using vba....
 
tx for your consideration, sandra
IP IP Logged
AnthonyPrince
Newbie
Newbie


Joined: 09 Mar 12
Location: United States
Posts: 2
Quote AnthonyPrince Replybullet Posted: 09 Mar 12 at 9:49AM
The final window, titled, 'Choose a file size and conversion setting' allows you to control the size of your merged PDF document. Consider the purpose of your new document. -Instant Tax Solutions Scam
IP IP Logged
dan cecil
Newbie
Newbie
Avatar

Joined: 24 Nov 12
Location: United States
Posts: 2
Quote dan cecil Replybullet Posted: 26 Nov 12 at 5:15AM
Hello,

new to the forum here.... I am trying to merge all files in a folder (all are pdf)... using vba in access... I keep getting error 401 files cannot be opened... any ideas?

thanks


Private Sub Command0_Click()
'fso = CreateObject("Scripting.FileSystemObject")

Dim x As Integer
Dim fs As Object
Dim fl As Object
Dim fld As Object
Set fs = CreateObject("Scripting.FileSystemObject")
Dim count As Integer
Dim oPDF As New PDF_reDirect_v25002.Batch_RC_AXD
dim TempBool As Boolean
Dim strFileNameShort As String
Dim Files_to_Merge() As String


set fld = fs.GetFolder("\\Pomsserver1\pomsserver\dropbox\MSA\Registration_and_Charges")
x = 0
For Each fl In fld.Files
x = x + 1
Next fl
ReDim Files_to_Merge(x - 1)
x = 0
For Each fl In fld.Files

Files_to_Merge(x) = fl.Name
x = x + 1
Next fl

    With oPDF
       
        TempBool = .Utility_Merge_PDF_Files("\\Pomsserver1\pomsserver\dropbox\MSA\Registration_and_Charges\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 IP Logged
Michel_K17
Moderator Group
Moderator Group
Avatar
Forum Administrator

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 26 Nov 12 at 7:33PM
Hi,

   I am sorry to hear of the problem. I would check the following:

  1. Make sure that PDF reDirect is in the "Professional" mode. Specifically, make sure that the printer is called "PDF reDirect Pro v2". Alternatively, go into the Preferences, and make sure that the General >> Startup Mode is set to PDF reDirect Professional.
  2. Make sure that you are a registered user, or that you still have some days remaining in the evaluation.
  3. Make sure that none of the files you are trying to merge are locked or encrypted. If you do not have too many files, open them one by one in Adobe's PDF Reader, and check their security.
   I hope that helps.

   Cheers!

Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
dan cecil
Newbie
Newbie
Avatar

Joined: 24 Nov 12
Location: United States
Posts: 2
Quote dan cecil Replybullet Posted: 26 Nov 12 at 8:39PM
Michel, thanks so much for your quick reply. I did check those items and everything looked good.. I also tried using a local path instead of a network path incase there was any network security issues present... any other ideas?... does the code look ok?... would you have any samples that might have done a similar thing?... merging all files in a folder?... thanks again

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

Joined: 25 Jan 03
Posts: 1673
Quote Michel_K17 Replybullet Posted: 26 Nov 12 at 10:59PM
Hi Dan,

   One more thing I noticed in your code: you add all of the files in the "Registration_and_Charges" folder, but you do not check to make sure that they are PDF files before adding them. Is there any chance that other (non-PDF) files are added? Or maybe a hidden file?

   Cheers!
Michel Korwin-Szymanowski
EXP Systems LLC
IP IP Logged
<< Prev Page  of 2
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