Hi all! I have some documentation to send in for work. Basically, I have a standard PDF with 10 fill in boxes. I also have a list of 1300 items I need to populate to this form. At the end, I will have 130 different PDFs each with 10 items.

Using Youtube, I was able to figure out how to write two subs, one to read the adobe pdf, and one to write to it. Using this code, I'd still have to manually paste in 10 items each time and write it to the PDF, then save the PDF. That defeats the purpose of me trying to automate this task.

How can I fill out these forms easily? I've tried using import data on Adobe Pro too, but I would also have to import the data each time I want to use a new record and save it.

Thanks!

HTML Code: 
Sub ReadAdobeFields()
Row_Number = 1

    Dim AcrobatApplication As Acrobat.CAcroApp
    Dim AcrobatDocument As Acrobat.CAcroAVDoc
    Dim sfieldName As String
    
    On Error Resume Next
    Set AcrobatApplication = CreateObject("AcroExch.App")
    Set AcrobatDocument = CreateObject("AcroExch.AVDoc")
    
    If AcrobatDocument.Open("\\userdocs\users$\va\Desktop\SSCM Implementation Blank Form.pdf") Then
        AcrobatApplication.Show
        Set AcroForm = CreateObject("Aform.Aut.App")
        Set Fields = AcroForm.Fields
        fcount = Fields.Count 'Number of Fields
            
                For Each Field In Fields
                Row_Number = Row_Number + 1
                sfieldName = Field.Name
                'MsgBox sFieldName
                
                Sheet1.Range("B" & Row_Number) = Field.Name
                Sheet1.Range("C" & Row_Number) = Field.Value
                Sheet1.Range("D" & Row_Number) = Field.Style
                
            
            Next Field
            
        Else
            MsgBox "failure"
        End If
        AcrobatApplication.Exist
        Set AcrobatApplication = Nothing
        Set AcrobatDocument = Nothing
        Set Field = Nothing
        Set Fields = Nothing
        Set AcroForm = Nothing
        
End Sub

Sub WriteToAdobeFields()

'topmostSubform[0].Page2[0].f2_12_0_[0]
    Dim AcrobatApplication As Acrobat.CAcroApp
    Dim AcrobatDocument As Acrobat.CAcroAVDoc
    Dimfcount As Long
    Dim sfieldName As String
    
    Set AcrobatApplication = CreateObject("AcroExch.App")
    Set AcrobatDocument = CreateObject("AcroExch.AVDoc")
    
    If AcrobatDocument.Open("\\userdocs\users$\va\Desktop\SSCM Implementation Blank Form.pdf") Then
        AcrobatApplication.Show
        Set AcroForm = CreateObject("AFormAut.App")
        Set Fields = AcroForm.Fields
        fcount = Fields.Count
    Fields("topmostSubform[0].Page1[0].Line1[0].f1_09_0_[0]").Value = "First Name" ' WORKS!
    Fields("topmostSubform[0].Page1[0].p1-cb1[0]").Value = "off" ' WORKS!
    
    Else
        MsgBox "failure"
    End If
    AcrobatApplication.Exist
    Set AcrobatApplication = Nothing
    Set AcrobatDocument = Nothing
    Set Field = Nothing
    
           
    
    
    
End Sub