I found a way to render the form fields inactive (if using Adobe objects):
Dim gAVdoc As Acrobat.CAcroAVDoc, pdDoc As Acrobat.CAcroPDDoc, gApp As Acrobat.CAcroApp
Dim formApp As AFORMAUTLib.AFormApp, formField As AFORMAUTLib.field, formfields As AFORMAUTLib.Fields
Public Function RenderAllFormFieldsReadOnly(pdfFile As String) As Boolean
'Loops through all the fields and makes them read only
On Error GoTo Error_Handler
Dim numFields As Long
'A little method to see if file exists (can write your own or delete)
If (Not FileExists(pdfFile)) Then
RenderAllFormFieldsReadOnly = False
GoTo Exit_Here
End If
Set gAVdoc = CreateObject("AcroExch.avdoc")
If (gAVdoc.Open(pdfFile, "")) Then
Set pdDoc = gAVdoc.GetPDDoc
Set formApp = CreateObject("AFormAut.App")
Set formfields = formApp.Fields
numFields = formfields.Count
For Each formField In formfields
formField.IsReadOnly = True
Next
Call pdDoc.Save(PDSaveFull, pdfFile)
End If
RenderAllFormFieldsReadOnly = True
Exit_Here:
Call closePDFObjects(formfields, formApp, pdDoc, gAVdoc, gApp)
Exit Function
Error_Handler:
RenderAllFormFieldsReadOnly = False
Resume Exit_Here
End Function
Public Sub closePDFObjects(formfields As AFORMAUTLib.Fields, formApp As AFORMAUTLib.AFormApp, pdDoc As Acrobat.AcroPDDoc, _
gAVdoc As Acrobat.CAcroAVDoc, gApp As Acrobat.AcroApp)
If Not formfields Is Nothing Then
Set formfields = Nothing
End If
If Not formApp Is Nothing Then
Set formApp = Nothing
End If
If Not pdDoc Is Nothing Then
pdDoc.Close
End If
Set pdDoc = Nothing
If Not gAVdoc Is Nothing Then
gAVdoc.Close (-1)
End If
Set gAVdoc = Nothing
If Not gApp Is Nothing Then
gApp.Exit
End If
Set gApp = Nothing
'Call fCloseApp("AdobeAcrobat")
'Sleep 250 'Give it time to stop
End Sub