in our application we receive word documents that contain text input FormFields. We access those fields, read the result value and set the result value to empty.
Reading the Result value works fine. But setting the Result to String.Empty does not behave in the same way as a form field that was just created.
Just for reference, a new form field looks like this in word document [ooooo] and when the document is protected and you click in the field then the whole area gets selected. When typing the empty characters vanish.
In my case (setting the Result to String.Empty) the form field looks like this ][ and the user cannot click into it.
This is how a new empty form field looks in the document.xml from a word document:
This is a step in the right direction, but it does not solve the issue completly.
The result of your approach is that the “look” is now the same between our processed form field and a new empty one.
But the “feel” is still different for the user. It would be nice if they behaved exactly the same.
Attached is another word file that demonstrates the issue:
When clicking in the processed field the cursor will jump to the point. When clicking in a new empty field the whole empty area gets selected.
I fear that our customers might be irritated by the different behaviour…
When iterating over the fields, is there a way to remove the field and insert a field at the same spot without changing the layout of the document? Maybe that would be an approach to solve the issue.
Thanks for being patient. We have logged a new feature request to write an empty value to form fields in the same way like Microsoft Word does. Your request has been linked to the appropriate issue (WORDSNET-9567) and you will be notified as soon as it is supported. Sorry for the inconvenience.