Share via

How to combine 755 or more word documents into one Word document with bookmarks

Anonymous
2017-04-29T19:28:16+00:00

Hello,

It is certainly possible to add one document at a time into one master Word document using the Insert Object feature, but to do this for 755 or more documents, could take 13 to 26 hours if each document is added one at a time as the Insert Object feature allows only  one document to be inserted at a time- CANNOT SELECT SEVERAL DOCUMENTS AND ADD THEM AS SOME ONLINE POSTINGS SHOW- if you can select all of them-please tell me how, after you have tried it yourself in Word 2016.

One cannot select a bunch of them and add them into one. I TRIED THIS WITH OFFICE 365 SUPPORT AS AN ADMIN- AND MS Support VIA WEB MEETING witnessed THE PROBLEM AND DID NOT HAVE A SOLUTION.

Though, I can combine all of them into a pdf document, and then convert that master document in pdf into word. Bu then again when there are so many documents how would one check if the conversions are all good with no formatting errors et al.

Is there no way to combine a bunch of word documents into one document, other than inserting one document at a time via the insert object and then selecting same from a folder?

Wonder if Word 2016, has a way of making a Word eBook from several hundred word documents?

Thank you for your interest and consideration to share a potential solution.

Microsoft 365 and Office | Word | For home | Windows

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

13 answers

Sort by: Most helpful
  1. Jay Freedman 207.5K Reputation points Volunteer Moderator
    2017-04-30T01:55:46+00:00

    Because long-running loops tend to lock up Word, I'd suggest adding the statement

    DoEvents

    between the line strFile = Dir$() and the line Wend.  That allows Word and Windows to process any other events that occur during each pass through the loop, and it might prevent any "Not Responding" states.

    1 person found this answer helpful.
    0 comments No comments
  2. Doug Robbins - MVP - Office Apps and Services 322.9K Reputation points MVP Volunteer Moderator
    2017-04-30T01:35:14+00:00

    Using an IncludeText field as Jay susggest is not the same as Insert Text from File

    Jay's suggestion was to use an IncludeText Field, which while it has the same description of "Insert text from file"

    is not the same as what I think that you are doing which is to use Insert>Object>Text from File.

    As Jay suggested, if all of the files are in a folder by themselves, a macro such as the following will insert all on the required INCLUDETEXT fields, then update those fields so that each one displays the text of the assocatiated document, and optionally unlinks the fields so that the results are converted to ordinary text.

    Dim FD as FileDialog

    Dim strFolder as String

    Dim strFile as String

    Dim rng as Range

    Set FD = Application.FileDialog(msoFileDialogFolderPicker)

    With FD

        .Title = "Select the folder that contains the documents."

        If .Show = -1 Then

            strFolder = .SelectedItems(1) & ""

        Else

            MsgBox "You did not select a folder."

            Exit Sub

        End If

    End With

    strFile = Dir$(strFolder & "*.doc")

    With ActiveDocument

        While strFile <> ""

            .Range.InsertAfter vbCr

            Set rng = .Range

            rng.Collapse wdcollapsend

            .Fields.Add rng, wdFieldEmpty, "INCLUDETEXT " & Chr(34) & Replace(strFolder & strFile, "", "/") & Chr(34)

            strFile = Dir$()

        Wend

        With .Range.Fields

            .Update

            .Unlink  'Optional to convert the result of the fields to text.

        End With

    End With

    Note that with 755 files to process, it may take some time for this code to process all of the files and it is very likely that Word will display Not Responding.

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2017-04-29T23:35:31+00:00

    Thank you. Very much appreciate your support.

    Partial success: I took your directions, and realized yes I can select ALL the documents in the folder to insert as "Text from File".

    I did that and pressed F9 to update.........but the dialog box stayed open for a long time with the circle hanging around - then after sometime I decided to click on "Insert" in the dialog box and it started to insert.

    Current Problem: I have literally tried this 5 times or more but it does not take in all the documents (755) and stops always after entering each time the same amount of files.....there are about  754 selected and stops after entering about 35 files. Does word have a limit to the number of files it can insert? No error message comes up. It just stops each time at the same file and does not continue to add all despite all are selected. (very strange?!).

    Waiting for a reply for a possible solution: As I was writing this I thought I could just continue adding 35 at a time.........but I will wait to hear from you or someone else to know why is this happening?

    Once again thanks for all your support. Sincerely appreciate it, as I need to read all these files but cannot get to consolidate them first.

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2017-04-30T05:53:03+00:00

    Doug thanks a ton for that detailed clarification!

    Appreciate your care, concern and detailed clarification. Your screen capture images made me realize what I was doing wrong- yes you are right I was going into object insert text file vs. field include text file- thanks!

    You guys are rock stars to help on the community.

    Currently I just wanted to reply with gratitude for your efforts.

    I have a deadline this Monday, after this deadline I will take this project up again and pursue to follow your guidelines.

    In the interim if there are any knowledge base articles I can read to realize what macros in this case are all about would be helpful as I need to learn the basics in this case. I guess I maybe able to follow the directions you write above for the macro, but never used macros before. Sorry for being such a novice, your help is valued. I will read them after Monday so no rush to your reply.

    In addition, not being greedy, since I have your attention, I wanted to find out how to create bookmarks from the consolidated documents-I just completed the pdf version of all the word documents and there are 4092 pages, so if I can be able to create bookmarks in the final word document from the consistent well formatted pages it would be a huge asset to navigate through the 4092 pages in word.

    Thanks Doug and Jay !!! Appreciate your support. I will set complete on this question after I have completed this task next week.

    Thank you again.

    Regards.

    0 comments No comments
  5. Jay Freedman 207.5K Reputation points Volunteer Moderator
    2017-04-29T21:13:39+00:00

    Instead of Insert > Object, put INCLUDETEXT fields in the document, one for each file to be included, each one in a separate paragraph (that is, with a paragraph mark following the field). Update all the fields (Ctrl+A to select everything, then F9 to update). Each field will show the content of the corresponding file. You can save the document as a Word file and/or a PDF file.

    If all the documents to be included are stored in the same folder, a macro can create all the fields for you.

    0 comments No comments