Good afternoon
We're evaluating DocIo in an our process that need to create .doc documents from a .doc model.
The .doc model contains fix texts and "variables"; variables have the syntax {@Cod - Description}.
The process would use DocIo with the following steps:
1 - open the model document
2 - clone it to the final document
3 - find all variables into the model (wordDocument.FindAll (regex))
4 - substitute all variables with values
5 - and also manage variables in tables (in this case, we must clone the table row...)
We found a strange behavior with a particular .doc model: looking for a variable is inside a table (by checking its owner), we got a "fouling" of the next selected text.
Attached to this post, you'll find a .zip file that contains:
- a VB project sample, that load the model document and does the operations
- the .doc model "TemplateMaster - Regex.doc"
Our "merging" process is done by Button2_click function; if you run it, click on button "Generate Regex" from the main dialog.
The code shows first 10 selections; then check if the 6^ item (variable) is inside a table: this operation will change the text selection of the 7^ item :-(
The "real" code will do the table check for each variable: we cut these operations just to go direct to the issue :-)
Thank you in advance for any suggestions you could give us! :-)
Best regards
sample and model_ee331153.zip