cristimitulescu
Technical User
Hi,
I am trying to create a word document where users type in some numbers in a Text Form Field and on exit of the Form Field a second text Form Field gets the same value as the first Form Field. This was eassily achieved with the code
Public Sub sta()
ActiveDocument.FormFields("aa1").Result = ActiveDocument.FormFields("a1").Result
End Sub
a1 is the name of the first Text Form Field and a2 is the second Text Form Field . These 2 lie in a row in a table with hundreds of rows.
The problem is that I have a few hundred of these fields displayed in a table and naming each one of these individually and creating a Sub for each row would be super time consuming.
I was thinking that if there was a way to create only one Sub to do the copying of contents by finding out what index form field had called the sub and using that to calculate where to copy to.
Unfortunatelly I have no clue where to start looking.
Thank you.
I am trying to create a word document where users type in some numbers in a Text Form Field and on exit of the Form Field a second text Form Field gets the same value as the first Form Field. This was eassily achieved with the code
Public Sub sta()
ActiveDocument.FormFields("aa1").Result = ActiveDocument.FormFields("a1").Result
End Sub
a1 is the name of the first Text Form Field and a2 is the second Text Form Field . These 2 lie in a row in a table with hundreds of rows.
The problem is that I have a few hundred of these fields displayed in a table and naming each one of these individually and creating a Sub for each row would be super time consuming.
I was thinking that if there was a way to create only one Sub to do the copying of contents by finding out what index form field had called the sub and using that to calculate where to copy to.
Unfortunatelly I have no clue where to start looking.
Thank you.