tags:

views:

42

answers:

0

For a variety of reasons that are immutable ... I have a Word document which contains a VBA application (the 'app document') which creates a new document based on another document (the 'template') which contains the framework for the new document. I want to embed the 'template' into the 'app document' so that I deliver one file and I know I am using the correct version of the 'template'.

I have, so far, embedded the 'template' file into the 'app document' and can find it by looping through "ThisDocument.InlineShapes", looking at .Field.OleFormat.IconLabel to find the 'template' by its name. The inlineShape.Field.OleFormat.Object is the 'template' document itself, and I can .Activate it, which causes it to appear as a regular document. I try to do SaveAs, and it does in fact save the file as the name I give it, however, that saved-as file is not left open, just the embedded file. I can .Activate the file and just save it, then open the saved file, but that seems more work than necessary.

So ... is the way I am doing this "the way", or I have missed some obvious practice? TIA