Sub WriteToAdobeFields()
Dim AcrobatApplication As Acrobat.CAcroApp
Dim AcrobatDocument As Acrobat.CAcroAVDoc
Dim fcount As Long
Dim sFieldName As String
Set AcrobatApplication = CreateObject("AcroExch.App")
Set AcrobatDocument = CreateObject("AcroExch.AVDoc")
If AcrobatDocument.Open("C:\Documents and Settings\Owner\Desktop\Ticket1.pdf", "") Then
AcrobatApplication.Show
Set AcroForm = CreateObject("AFormAut.App")
Set Fields = AcroForm.Fields
fcount = Fields.Count
Fields("Contact Name").Value = "Mr Customer6897687979679!!!"
Fields("Cust Training").Value = "No"
Fields("Tech Name").Value = "Name"
Else: MsgBox "failure"
End If
' -------------------------------------------- This seems to do nothing
' -------------------------------------------- If I AcrobatApplication.Close it gives me a left side function error
AcrobatApplication.Exit
Set AcrobatApplication = Nothing
Set AcrobatDocument = Nothing
Set Field = Nothing
Set Fields = Nothing
Set AcroForm = Nothing
End Sub
Bookmarks