How to go from static external data source in a Docvariable to userform input of dynamic text & date
Graham Mayor’s website includes an example and demonstration of how to create a userform which is located on his Word Pages Tab. The final example covers a userform containing a pair of multi-column list boxes. His illustration attached.
The data to populate the listboxes is taken from an external word document containing two tables. The second table has as its columns the name of the document which is displayed in the list box and the second column contains “content of letter1”, “content of letter2”, etc. When the selection is made from the first column “DocName1” the corresponding “content of letter1” is imported into a Docvariable Field contained in the document. This works perfectly for the contents of letters that are static and never change.
I am considering an attempt to modify the demonstration to accommodate situations where the letters content can be modified. The various letters content would need from one to about six fields of data some with dates and some with text.
My question is how best to modify with the minimum change to the structure of the demonstration to allow user input by way of textbox entry on the userform? Is it practical to include in a module the code necessary to find and place bookmarks in the “letter1” text, or whichever letter was selected after it has been imported into the Docvariable, where the dynamic data should be inserted with a corresponding series of textboxes conditioned upon which selection is made to display on the userform for entry of the data for insertion for each bookmark?
Does anyone have thoughts on whether there is a better and simplier or more direct way to accomplish the desired result?
|