Skip to main content
Participant
September 30, 2021
Question

VBA to edit XFA pdf

  • September 30, 2021
  • 1 reply
  • 2350 views

does it support to use VBA to edit XFA pdf?

 

I am able to get the field value with below path:

 

jso.getfield("residualValueForm[0].en[0].SectionA[0].TableGeneralInfo[0].RowIssuer[0].issuer[0]").Value

 

but I am not able to update the field using the same path or resolvenode with either of below:

 

jso.getfield("residualValueForm[0].en[0].SectionA[0].TableGeneralInfo[0].RowIssuer[0].issuer[0]").Value = "1"

 

jso.xfa.resolvenode("residualValueForm[0].en[0].SectionA[0].TableGeneralInfo[0].RowIssuer[0].issuer[0]").rawvalue = "1"

 

jso.xfa.resolvenode("forms.residualValueForm.en.SectionA.TableGeneralInfo.RowIssuer.issuer").rawvalue = "1"

jso.xfa.form.residualValueForm.en.SectionA.TableGeneralInfo.RowIssuer.Issuer.rawValue = "1"

This topic has been closed for replies.

1 reply

Legend
September 30, 2021

The problem here is no actually VBA. It is JavaScript. XFA forms have an ENTIRELY DIFFERENT JavaScript implementation, In particular, getField does not exist at all. You need to refer to the XFA JavaScript reference. 

Participant
September 30, 2021

In this case, is it feasible to fill in XFA form via VBA? "XFA JavaScript reference" is eligible to reference via VBA?

 

If yes, do you know where I can get sample code? Thank very much

Participant
November 5, 2021

Hello, i am in a same problem. I am new to this and can not seem to make sense of how to write values to the form. I have also tried the same variations as you mention above with resolvenode.  Any sample code help is greatly appreciated. thanking you in advance.