Note: I wrote this guide about when I was working at the Toronto Stock Exchange and had to create a couple of large documents that had content that was being shared with another writer. I did not trust Word's Master Document feature so came up with my own solution. It took a bit more effort than using Master Documents but was stable. Seeing the recent Office Watch article on master documents made me think that this guide might still have some value so I'm posting it here. I've checked it against the current version of Word in Microsoft 365.
Most people work with Word documents as a single file. This has the advantage of simplicity. However, there are times when it makes sense to split a document up into more than one file:
- Large documents (more than 200 pages) or documents with many tables and graphics can become slow to work with and are prone to corruption.
- You may need to compile a document that has many authors or contributors.
This guide explains how to construct a document that is made up of several Word files without using Word’s Master Document “feature”. To avoid confusion with Word’s Master Document terminology, I will call the document that you are trying to produce the container document. The individual documents that it contains are subdocuments. Each subdocument will be a separate file.
Most technical writers do not recommend using Word's Master Document feature. They are highly unstable and can corrupt your work. The method outlined in this guide, while it involves more up-front work, is much more stable. That being said, if you must use Master Documents, follow the guidelines at the end of this guide.
Prepare Your Documents
It is very important that all documents that make up your container document:
- Have the same template attached.
- Have the same paragraph and character styles.
Use the Developer > Document Templates > Organizer command to ensure that the same template is attached to all of your documents. To be on the safe side, you should use the Organizer to copy the styles from the template into all of your documents.
All documents that you need to work with should be in the same directory.
Create the container document
When working with subdocuments:
- Use Insert > Object > Text from File to insert your subdocuments.
- Put a section break after each subdocument.
- Inserted documents are not editable. To make changes, edit the subdocument file.
- Press F9 to update subdocuments.
Important Note: Never try to edit text in the subdocuments while you are in the container document. It will seem like you can, but you will lose your edits as soon as you update the fields in the document (when you print or switch to Page Preview mode, for example).
Create your headers and footers in the container document. Word does not use the headers and footers in the subdocuments. (This is important, and it will drive you crazy trying to figure out what is going on with your headers and footers unless you know this).
Always open your subdocuments with Word’s File > Open command. Never open the subdocuments from within Windows Explorer. (If you do, Word can lose track of path information, messing up your links inside the documents.)
Manage page numbering
One downside of this method is that you will have to manually set the page numbering for each subdocument.
- Check the page number at the end of your first subdocument.
- Open the second subdocument.
- To set the starting page number for the second subdocument, choose Insert > Page Number > Format Page Numbers.
You can use chapter-page numbering to get around this. If you do, your Heading 1 numbering should correspond to your chapter numbers. If this isn’t possible, don’t use heading numbering in your document.
Use a SEQ field to insert a chapter number in your document:
{ SEQ Chapter \r1 \h }
in the first file inserts the chapter number of one and hides it. The second chapter would be:
{SEQ Chapter \r2 \h}
or
{ SEQ Chapter \n }
which will put the chapter numbers in sequence automatically in the container document, but not in the individual subdocument if you have to work with it that way.
To put the chapter number as part of the page number, put
{SEQ \c Chapter}
before the page number.
Add a TOC or index
If you are using the Insert > Object > Text from File method to put the subdocuments in the container document, you can use the standard Word TOC and INDEX fields for your table of contents and index.
Otherwise, use RD (Referenced Document) fields to pull in information for a table of contents or index.
{ RD “Chapter 1.doc”}
If you are using chapter-page numbering add \s Chapter to the TOC or Index field code. Do not check the option in the Page Number Format dialog box to include the chapter number. Doing so will result in a duplicate chapter number in the TOC.
Manage cross-references
For cross-references inside a file, you can use the standard Word command: References > Cross-reference.
Because you cannot edit the subdocuments as part of the container document, you cannot use the References > Cross-reference command for cross-references between files. Any cross-references would be lost as you as you update the INCLUDETEXT field that contains the file’s data.
Instead, you have to create a bookmark at the cross-reference target and use an INCLUDETEXT format where you want the bookmark to appear. The INCLUDETEXT field will have the following form:
{ INCLUDETEXT “B.doc” “Bookmark_name” \! \* Mergeformat }
where B.doc is the target file.
To include a cross-reference that references a page number, you must first include a hidden {PAGE} field on the page that you want to cross-reference in the target file, then create a bookmark of the {PAGE} field. Then use the INCLUDETEXT field method as described above.
Working without a container document
A container document may be needed if you have to have a single Word file that contains all of the content; for example, to make it easier for people to print a document. However, it is difficult to maintain and can be unstable.
A simpler approach is to create a file just for the front matter of the document, which would consist of the cover, preface (copyright, approvals, etc.), and table of contents. After the table of contents, use RD fields to pull in the headings and page numbers from the subdocuments.
To control pagination, you can use chapter-page numbering or manually force continuous page numbering using bookmarks and REF fields. Chapter-page numbering is probably simpler in most cases.
With this technique, you will need to override heading numbering for the first Heading 1 paragraph in each file (likely there will be just one).
If you use Word's Master Document feature
There is enough evidence that Word's Master Document feature is unstable to make most technical writers avoid it. That being said, if you do want to use it, follow these guidelines rigorously:
- All authors MUST use the same template.
- Do NOT modify any character or paragraph styles in the subdocuments.
- Do NOT apply direct formatting. All formatting MUST be applied from the template styles (this is especially important for bulleted and numbered lists).
- NEVER paste formatted text from another document. If you must paste text from another document, use the Paste Special > Unformatted text command and reformat it from the template styles.
- Use the .docx format instead of the older .doc format for your files. It is more stable.
- Backup, backup, and backup again. I recommend daily backups of all documents in a different directory each day.
No comments:
Post a Comment