Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ' github.com/marksduarte
- '
- ' The Adobe Acrobat 10.0 [or anyone version] Type Library
- ' is needed to the project.
- '
- Sub AdobeFill_Click()
- Dim objAVDoc As New AcroAVDoc
- Dim objPDDoc As New AcroPDDoc
- Dim objJso
- Dim strFilename As String: strFilename = "C:\Temp\file.pdf"
- If (objAVDoc.Open(strFilename, "")) Then
- Set objPDDoc = objAVDoc.GetPDDoc
- Set objJso = objPDDoc.GetJSObject
- With objJso
- .getField("name").Value = "Marks Duarte"
- .getField("date").Value = Format(Date, "dd.mm.yyyy")
- End With
- If objPDDoc.Save(PDSaveIncremental, strFilename) Then
- objAVDoc.Close 1
- objAVDoc = Nothing
- objPDDoc = Nothing
- objJso = Nothing
- End If
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement