Combining 200+ Word documents into a single document.

Anonymous
2022-10-26T01:17:52+00:00

Hi,

I would like to automate the following for about 200+ documents.

a) For each document, add the filename of the document as a field in the header of every page of the document.

b) Add a page number to each document.

c) Combine all the documents into a single document, with page numbers reflecting pages in the combined document.

d) Create a table of contents to the combined document, with each document as a table index - with appropriate page number and navigation link.

What is the best way to get this going? Happy to purchase/pay for reasonably priced third-party tools.

Thanks!

Microsoft 365 and Office | Word | For home | MacOS

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Paul Edstein 82,871 Reputation points Volunteer Moderator
    2022-10-26T12:20:03+00:00

    See: Combine Multiple Word Documents (msofficeforums.com)

    Most of the work is already done for you. Do note that adding a filename field to the source document headers is futile, as the fields will all update to the name of the destination document. The only way around that would be to insert the filenames as text, not as fields - or convert the fields to text before the documents are combined.

    It is not apparent what you mean by Create a table of contents to the combined document, with each document as a table index.

    A standard Table of Contents is created via a TOC field - which usually points to content created using Word's Heading Styles. If you insert a TOC field and your source documents use Heading Styles, you'll get a Table of Contents with each heading listed in the order that it appears in the combined document and each entry will link to the corresponding heading in the document body.

    Indexes are entirely different, listing topics in alphabetic order and they don't have active links to the indexed content in the document body.

    Was this answer helpful?

    0 comments No comments
  2. Doug Robbins - MVP - Office Apps and Services 323.6K Reputation points MVP Volunteer Moderator
    2022-10-26T03:15:10+00:00

    To have the filename appear in the Header of each page of the documents, you could use a batch process to add the filename field to the header, and then unlink the field so that the filename would become ordinary text.

    If you want to use the Filename as entry in the Table of Contents, once the documents are combined, there are two ways:

    1. Use a batch process to add a filename field at the top of the document, unlink that field, and apply a style to it. You would normally use the Heading 1 style for that purpose. However, if the documents already make use of the Heading # styles.
    2. Use a batch process to add a TC field at the top for each document for which the arguement is the filename

    A batch process would also be used to combine all of the documents.

    See the following page of Graham Mayor's website

    http://www.gmayor.com/document_batch_processes.htm

    If you need assistance get in touch with me.

    Was this answer helpful?

    0 comments No comments