Quote:
Originally Posted by mmmconsulting
Also, I created my "source" file (the one with all the INCLUDETEXT commands) in the same directory as the files I'm including. That way I can make the INCLUDETEXT a little shorter, using a relative path:
{ INCLUDETEXT "Introduction.docx" \* MERGEFORMAT }
{ INCLUDETEXT "RequestTimeOff.docx" \* MERGEFORMAT }
{ INCLUDETEXT "PayrollPolicies.docx" \* MERGEFORMAT }
|
Whilst that will work provided everything remains in the current folder, you're liable to find it'll break when the files are moved to a different folder, especially if different Word versions become involved. To make this workable across all folders & Word versions, using your first example:
1. insert /../ thus:
{ INCLUDETEXT "/../Introduction.docx" \* MERGEFORMAT }
2. Press Ctrl-F9 before the first /, to create a pair of field braces, thus:
{ INCLUDETEXT "{ }/../Introduction.docx" \* MERGEFORMAT }
3. Fill in between the field braces, thus:
{ INCLUDETEXT "{FILENAME /p}/../Introduction.docx" \* MERGEFORMAT }
The same approach can be used for HYPERLINK fields, RD fields and INCLUDEPICTURE fields, though you need to at least temporarily switch to the .doc format to be able to access INCLUDEPICTURE field codes.