Results 1 to 4 of 4

Thread: Populate PDF Form via VBA

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    I have 7.0, but assuming your VBA code does something like (where cPDF is your document)

     
    AcroApp = CreateObject("AcroExch.App")
    AvDoc = CreateObject("AcroExch.AVDoc")
    PDDoc = CreateObject("AcroExch.PDDoc") 
    If AvDoc.Open cPDF,"" Then 'pdf document is open
    then to fill in form data, something like

     
    AcroForm = CreateObject("AFormAut.App")
    Fields = AcroForm.Fields
    For Each f in Fields
        If f.type="Text" Then Fields.Item(f).Value = "something"
    Next f
    If your form has radio buttons, other types of controls or you need fields marked as readonly after data is entered, it gets more complicated, so you might want to post a copy of the pdf. .02 Stan
    Last edited by Aussiebear; 03-09-2025 at 09:17 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •