Somehow, I still think you don't 'get' it.
An INCLUDETEXT field that uses a relative path to reference a bookmarked range in a source document would be constructed along the lines of:
{INCLUDETEXT "{FILENAME \p}/../SourceDoc.docx" "BookmarkName"}
In this scenario, both the Acme and Apex companies would use their own versions of SourceDoc (i.e. both companies would have a document named 'SourceDoc.docx'). That document would hold all the variable data for the compnay concerned. Each company's source document would also use the same bookmark names. The target document would hold both the boilerplate text and the INCLUDETEXT fields that reference only SourceDoc.docx plus the relevant bookmark names.
With the above approach, no Document Variable or DOCVARIABLE field is required. You would only need the Document Variable and DOCVARIABLE fields if you wanted to specify the source document:
• path;
• name; and/or
• bookmark.
For example, to specify the:
• path, you might use:
{INCLUDETEXT "{IF {DOCVARIABLE Company}= "Acme" "C:/Acme/SharedFiles/" "H:/Apex/SomeFolder/"}SourceDoc.docx" "BookmarkName"}
where 'Acme' or 'Apex' is part of the path (other variable name text could be used instead of 'Acme' or 'Apex')
• name, you might use:
{INCLUDETEXT "{FILENAME \p}/../{IF {DOCVARIABLE Company}= "Acme" "Acme" "Apex"}Source.docx" "BookmarkName"}
where 'Acme' or 'Apex' is part of the filename (other variable name text could be used instead of 'Acme' or 'Apex')
• bookmark, you might use:
{INCLUDETEXT "{FILENAME \p}/../SourceDoc.docx" "{IF {DOCVARIABLE Company}= "Acme" "Acme" "Apex"}BookmarkName"}
where 'Acme' or 'Apex' is part of the bookmark name (other variable name text could be used instead of 'Acme' or 'Apex').
The first and second DOCVARIABLE approaches envisage separate source documents for each company. If you use the third DOCVARIABLE approach, perhaps even when combined with the first one, that allows you to maintain a single source document for both companies, with the variable content differentiate by the bookmark names. Any of these approaches allow you to "require the author to toggle both the terms", but I can't see why you'd want to do that. Surely you wouldn't want staff at Acme & Apex switching Document Variables so they can get access to each other's content and maybe even fake each other's letters!?? If you're concerned to test the development, simply use:
• a field along the lines of:
{INCLUDETEXT "{FILENAME \p}/../SourceDoc.docx" "BookmarkName"}
• maintain separate source documents for Acme and Apex; and
• copy the Acme or Apex source documents to SourceDoc as required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|