Since you mentioned the free toolkit, would like to check whether you installed the PDFtk Free (Graphical tool) or PDFtk Server which is also free.
The code works with the PDFtk Server.
If you are using the Server version then, did you use the code I provided and where is the error happening or what is the error message?
I installed PDFtk Server. I used the Code below
...
...
If InStr(Environ("Path"), "pdftk") = 0 Then
MsgBox "It appears that PDF tool kit is not installed on this computer. " & _
"Please refer to user guide for instructions on how to install it. " & _
"This program is needed in order to merge pdf files.", vbExclamation + vbOKOnly, "Missing Program PDFtk"
MergeRFI = ""
Exit Function
End If
stMergeFiles = Chr(34) & PDFName1 & Chr(34) & " " & Chr(34) & PDFName2 & Chr(34) & " cat output " & Chr(34) & Replace(PDFName1, ".pdf", "M.pdf" & Chr(34))
retVal = Shell("pdftk " & stMergeFiles, vbMaximizedFocus)
MsgBox "Please wait for pdftk 'BLACK SCREEN' to close and then press OK to continue." & vbCrLf & vbCrLf & "Note:Big files may take longer to merge. Please be patient", vbOKOnly + vbExclamation, "Files Merged"
DoEvents
...
...
About the error:
1- All of "MergeRFI", "stMergeFiles" and "retVal" are not define. Should I define them as string?
2- Should I replace "PDFName1", "PDFName2" with my pdf file name? Also where should I replace the pdf files that I want to merge them?
3- There is no black appear after the message "Please wait for pdftk 'BLACK SCREEN' to close and then press OK to continue......"
4- is it possible to add the page number in the right side of the footer and add a custom number (such as report number and print date) on the left side of the footer?
5- Do you mind to attach an MS Access example with dummy pdf files in zipped folder?
Your help is very appreciated