The debugger "shows" the value of the form field, but after I save the PDF file, Acrobat Reader (or Pro) shows nothing in that field.
However, upon re-running my routine, a call to getField("xyz") does produce the value that was set in the previous run.
So the value is "in there", but does not show visibly. Also strange, I set the ReadOnly property to False, but it remains ReadOnly.
Upon further review, what appears to be happening is that another field has a MouseUp event handler coded to set the form field in question to a null string.
The handler appears to be firing before the form is closed programatically even though there is no user interaction !!!
Yep, and now I found it: there was an initialization script at the document level...that was resetting the fields in question programatically.
Now I'm in big trouble: how to disable that ? What I need is a special Open method that acts like a MS Office document opened in "Safe Mode".