This is a very odd way of doing things.
1. You are accessing the Registry in order to run a macro?
2. You are adding a new document, and not only that a .dot template file - this is very bad form - then saving it as a temp file;
3. then inserting that saved temp file.
As Tony mentioned there is confusion re: means and end.
I will repeat. Using a .dot template that is OPENED to users is not the purpose of .dot files. In fact, using a .dot file this way is absolutely pointless. You may as well simply use a .doc file, because that is what you are using it for. The fact it is, a .dot file becomes completely irrelevant if you open the file itself.
I asked about the actual steps you wish to take, with no solid response.
Make the whole thing ONE .dot file and build everything into it, including whether you need form 2, or not. As you do not specify what your real specs are - do they ALWAYS need the contents of "10-122test.dot"?? You do not state if this is so.
If they DO always need the contents, and form, within 10-122test.dot, then build the whole thing into ONE template. If they do NOT, but you need to give them either a choice (their choice), or there is LOGIC that requires 10-122test.dot, then build that into the ONE template.
You do not state what fires, or needs to fire the form within 10-122test.dot. You do not state why there is some design need to keep these documents separate. Is there a real need?? If not, then again, make them ONE document. The contents can be adjusted however you need them to be.
I can not stress how this is a DESIGN issue.
For example, I work with documents that require that they be in both English and French. Some documents have five "chunks" (or actually 10 chunks, as each needs to be both English and French). Each chunk has its entire text - some them 5 pages long) as actual bookmarks. There is logic with the Document_Open event that determines, by user choice, which chunk is valid for the current purpose. After confirmation (of course!), the macro totally removes the unneeded chunks.
It is a financial document. If the user selects to act on a Journal Voucher document, the Document_Open macro removes, totally, the other irrelevant parts (Cost Recovery , or parts) before continuing. In other words, the full template is some 25 pages, but after the users selects what type of financial tranction, the document (cloned from a .dot file) reconfigures itself into, oh, maybe a 4 page document. Sometimes, it is much easier to remove things, than add things.
This is, again DESIGN. You could have all the 10-122test.dot macro capabilities WITHIN the original file, and if required, these will fire. No need to go outside, or make a temporary file you save and bring back in. Totally unneeded. Also unneeded is to go out to the registry to fire a macro in another file.
But hey, if it works for you....
Gerry