CC Insert Difficulties
Hello members,
I've been tinkering lately with the built-in CustomXMLPart events. The most recent accomplishment is a template (attached) showing two methods to provide a variable (user defined) number of input fields.
When the user selects a number from one of the two dropdown lists, the defined number of variable data fields (plain text CCs or building block containing text and plain text CCs) is inserted the applicable rich text container CC. See first attached image.
The DDL CCs are mapped to a customXMLPart (See second attached image) and the built-in events of that CustomXMLPrt detect when the user makes a selection.
For example, if the user selects "4" in the first DDL tagged "Number_of_children" then four plain text CCs are inserted in the richtext CC "Children_Names" (sorry, there is a typo in the picture).
Here is my difficulty (See third attached image). It isn't the end of the world, but I can't figure out why (or how to avoid) I have so "Select" the defined range before I can "Add" the CC????
If you Stet Out the oRng.Select line then the next line throws and error complaining that a CC can't be inserted. Perhaps I can't see the tree for the forest and hoping a fresh set of eyes may see something obvious. Thanks and functioning file is attached.
|