Article View: adobe.acrobat.sdk
Article #88Re: Getting error "No document is currently open" using SDK 9 forms automation
From: Farry_Philippe-Auguste
Date: Wed, 18 Mar 2009 13:12
Date: Wed, 18 Mar 2009 13:12
36 lines
1770 bytes
1770 bytes
I have the same problem using the SDK9 but I'm writing it in MSAccess 2003 and VBA.
Here is what I have written
Dim acroXapp As Acrobat.AcroApp
Dim AcroXAVDoc As Acrobat.AcroAVDoc
Dim AcroXPDDoc As Acrobat.AcroPDDoc
Dim AcroXFormApp As AFORMAUTLib.AFormApp
Dim Field As AFORMAUTLib.Field
Dim Fields As AFORMAUTLib.Fields
Dim Form As AFORMAUTLib.Fields
Dim nFields As Long
Dim Fok As Integer
Dim dbs As Database
Dim rst As Recordset
Dim fld As Fields
Dim sSQL As String
Dim lRecords As Long
Dim iRow As Integer
Dim iCol As Integer
Dim iFld As Integer
sOutput = CurrentProject.Path & "\tmp\" & hostname & "_SIC.pdf"
If Dir(sOutput) <> "" Then Kill sOutput
FileCopy sTemplate, sOutput
Set acroXapp = CreateObject("AcroExch.App")
Set AcroXAVDoc = CreateObject("AcroExch.AVDoc")
If AcroXAVDoc.Open(sOutput, sOutput) Then
Set AcroXFormApp = CreateObject("AFormAut.App", "localhost")
'this is where I get the error about no document in the Acrobat viewer.
Set Form = AcroXFormApp.Fields
End If
Technical Details
Message-ID:
<59b6698d.4@webcrossing.la2eafNXanI>Path:
arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossingReferences:
<59b6698d.-1@webcrossing.la2eafNXanI>Show Full Headers
Complete Article Headers
X-Google-Thread: 10177e,b2f19776c9755574 X-Google-Attributes: gid10177e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: Farry_Philippe-Auguste@adobeforums.com Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news.glorb.com!newshub.sdsu.edu!webcrossing Newsgroups: adobe.acrobat.sdk Subject: Re: Getting error "No document is currently open" using SDK 9 forms automation Message-ID: <59b6698d.4@webcrossing.la2eafNXanI> Date: Wed, 18 Mar 2009 06:12:23 -0700 References: <59b6698d.-1@webcrossing.la2eafNXanI> Lines: 38 MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit