VBA form in a Word template
Posted on 2003-11-06
I have become very frustrated with the following problem, so I'd be very grateful for any suggestions.
I have a word template, which contains a text field (say "txtName"). I also have a form, which contains a text box (say "txtEnterName"). I want to set txtName to the value of txtEnterName. I am trying to do this with code like "ThisDocument.txtName = txtEnterName" in the form's code. This works fine in the template, but whenever I create a new document from the template, it is the template's text field that's altered, not the current document's.
What should I be using instead of "ThisDocument"?
Thank you very much