View Single Post
 
Old 01-27-2016, 04:21 AM
ArtKilp ArtKilp is offline Windows 8 Office 2016
Novice
 
Join Date: Jan 2016
Posts: 18
ArtKilp is on a distinguished road
Default Named text field in Word document

In Excel I can say =A1 to read whatever there is in cell A1 and if I want to name it, I just type a name in the Name Box. I'd want the same thing for Word, what is the preferred approach?

That is, I want to have an array of copies of a document which I first programmatically generate so that each one has a name (one of those named text fields) and an address (another of those fields). Then when people have filled in the address and I have all the similar documents somewhere, I want to read programmatically all of those addresses and save them somewhere (where, that is out of subject, assume a VBA array for example).

Some options I have considered are ActiveX controls and Word fields. Word fields would be preferred, but they seem to be working vice versa - Word fills automatically stuff in the field instead of you telling Word that "list me the content of fields named 'name' and 'address'". So, when I say mygivendocument.namedfield("address").content (or whatever the syntax would be), I get the content of that address field just like that.

Another limitation is that I want to create those fields without using VBA code - that is, I can create the business logic by VBA, but I want to assign a non-programmer user to create those fields (because he will create the document "decorations" as well).

So what would the best approach be?
Reply With Quote