Lebans PDF Merge

2wistd

Registered User.
Local time
Yesterday, 20:31
Joined
Jan 17, 2013
Messages
66
I am using the code and took only the Merge part from it. Exported/Inported the database into mine and created a button that would create two pdfs, merge them and rename it. It works great if I first use the existing 'Form_HowToUse' to "Click here to Save this Report as a PDF document" , and then go to merge. If I do not, I get a error #53, unable to find the dll file. It is clearly in the same directory, and works, but only after I use the existing code. Any clues to why this could be?

Thanks
 
any help on this? what am I missing?

This is my code:
Code:
Private Sub Command50_Click()
DoCmd.OutputTo acOutputReport, "Page 1", "PDFFormat(*.pdf)", "1.pdf", False, "", , acExportQualityPrint
DoCmd.OutputTo acOutputReport, "Page 2", "PDFFormat(*.pdf)", "Page 2.pdf", False, "", , acExportQualityPrint

Dim blRet As Boolean
' Call our Merge function
' Please note the PDF doc passed as the second param is merged into the PDF doc passed as the first param.
' For testing purposes:
Dim sMaster As String
Dim sChild As String
sMaster = "Page 1.pdf"
sChild = "Page 2.pdf"
blRet = MergePDFDocuments(sMaster, sChild)
Dim KillFile As String
KillFile = "Page 2.pdf"
Kill KillFile
Name "Page 1.pdf" As "Roster - " & Format(Date, "yyyymmdd") & ".pdf"
MsgBox "Your roster has been updated: " & blRet
End Sub

It works great but I must click on "Click Here to Save this Report as a PDF document". What is that doing to allow me to use that code? if I don't, I get error #53, missing DLL files.
 
Okay, I solved the problem on my own. Thanks for looking.
 
Could you please tell me how you solved your problem? I've been using this code successfully but we're upgrading to Windows 7/Office 2010 and now I'm getting a 53-File Not Found: StrStrorage.dll error message.
 

Users who are viewing this thread

Back
Top Bottom