Hello, I have a form that a couple users will work on where they enter some data on pdf documents. The path of those documents is stored in a field called FiileName. I want to put a command on the form that uses the table where FileName is stored.
Thus far I've searched through Google and found some code to start, but I can't get it to work. Could anyone take a look at the code and offer comment, or please direct me toward a better solution?
Thank you so much,
Private Sub OpenPDF_Click()
Dim AcroApp As Object
Dim PDDoc As Object
Dim avDoc As Object
Set AcroApp = CreateObject("AcroExch.App")
Set PDDoc = CreateObject("AcroExch.PDDoc")
If PDDoc.Open(tblStudyDescription.FileName) Then
Set avDoc = PDDoc.OpenAVDoc("")
MsgBox "Unable to open the PDF-file", vbInformation
Set avDoc = Nothing
Set PDDoc = Nothing
Set AcroApp = Nothing