• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Automating XFA PDF forms from Access VBA

New Here ,
Feb 06, 2023 Feb 06, 2023

Copy link to clipboard

Copied

Hello,

I've been working on automating filling in fields on PDF forms using Access VBA.  I reference directly the Adobe libraries in VBA to skip having to use "CreateObject", but otherwise have been adapting online examples with a good degree of success.

 

The problem I've encountered, however, is the inability to access the rawValue property of an empty field.  That is, if I open a blank XFA form, I can access the field, but VBA returns "Object doesn't support this property or method", meaning it can reslve the field node, but cannot access the "rawValue" property.

If I populate the field in Adobe, then re-run the script, it runs without issue.  Obviously a null / unpopulated field in a form is not fully initialized / exposed to the object model from within VBA.  Is there a workaround I can do in the VBA side?  I could save a version of the form with dummy values to sidestep the issue, but the form updates out of my control, which means I'd have to do that every time a an update occurs.  I'd rather be able to download the latest current version and populate that.

TOPICS
How to , JavaScript , PDF forms

Views

153

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation