title: Opening Acrobat Files using VBA
body: <p>I was reading from a forum thread:
  <a href="https://forums.adobe.com/thread/604177" rel="nofollow noreferrer">https://forums.adobe.com/thread/604177</a> 
  and started experimenting with it. But I think the function didn't load at all. I wasn't sure what might the reason be behind it - I reckon it has to be simple and probably related to the library. Can someone help point out why the following code failed to compile at all (the code appeared not to have ran upon execution in immediate as none of the breakpoints triggered).</p>
  
  <p>The libraries I have loaded include</p>
  
  <ul>
  <li>Acrobat Distiller</li>
  <li>Adobe Acrobat 10.0 Type Library</li>
  <li>Acrobat Scan 1.0 Type Library</li>
  </ul>
  
  <p>The computer which this code is executed on have Acrobat Professional installed on it. </p>
  
  <pre><code>Public Function GetPDF() '(FilePath As String) As Object
      Dim origPdf As Acrobat.AcroPDDoc
      Dim path1 As String
      MsgBox ("Start")
  
      path1 = Application.ActiveWorkbook.Path
      path1 = path1 &amp; "\31700100.pdf"
  
      Set origPdf = CreateObject("AcroExch.PDDoc")
  
      If origPdf.Open(path1) Then
          MsgBox ("weee")
      End If
  
      origPdf.Close
      Set origPdf = Nothing
  End Function
  </code></pre>