I have a VB6 application that hosts PDF forms designed using LiveCycle Designer 8. The VB6 application uses OLE Automation to load, display and interact with the form. The form is hosted in a VB6 standard form object. However, the form will need to able to get data from the VB6 application for events like button clicks, loading data into drop-down lists, validations, etc.
It uses this approach (in VB6) to load and display a PDF file:
...
Set AcroExchApp = CreateObject("AcroExch.App")
Set AcroExchAVDoc = CreateObject("AcroExch.AVDoc")
ok = AcroExchAVDoc.OpenInWindowEx(sFileName, Me.hWnd, CLng(AV_DOC_view), True, 0, CInt(PDUseNone), TmpViewMode, iZoomLevel, 0, 0)
If Not ok Then
MsgBox "Can't open file: " & sFileName, vbCritical, ""
Set AcroExchAVDoc = Nothing
Set AcroExchApp = Nothing
Exit Function
End If
Set AcroPDDoc = AcroExchAVDoc.GetPDDoc
Set AcroExchAVPageView = AcroExchAVDoc.GetAVPageView
Set jsObject = AcroPDDoc.GetJSObject
...
None of the AcroExch objects have any events exposed. How can I get my form to access methods or functions from within the VB6 application?
Is this possible and, if so, what is the preferred method to do this?
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script