+ Reply to Thread
Results 1 to 2 of 2

How to merge and split many MS Word files

  1. #1
    Registered User
    Join Date
    10-14-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    7

    Question How to merge and split many MS Word files

    G'day everyone

    Does anyone know of a set of macros that (a) merges a number of MS Word files into a single document, and then (b) later unmerges them back into the original files (or: into files with the original file names)?

    I understand that merging files may cause loss of things like footnotes, and that merged documents will inherit the styles and page properties of the first file, and that those things will be lost and would not be able to be recreated when the file is unmerged again. For my own purposes, the files that I want to process do not contain footnotes, headers, etc, and they all have the same page properties and the same styles.

    I'm a translator and I sometimes get multiple files from clients, which are sometimes easier to deal with as one large file, especially if I want to run additional macros on the files. Last week a client sent me 100 MS Word files to process, and if I had just one file to process, the things I had to do would have taken 10 minutes to complete, but since I had to deal with 100 files individually, I had to spend hours on what is essentially exactly the same task.

    There are many macros on the web that can merge files. In fact, one can use the function to insert files into MS Word to merge files. But that does not solve the problem of splitting. I can do the merge and split using e.g. AutoIt, but that is cumbersome (and difficult to explain to colleagues who might want to use that method) and I'm sure it must be possible to do it simply with a macro.

    So, does anyone know of a macro or macros that merge files and then unmerge them again later?

    Thanks
    Samuel

    [This post is not cross-posted elsewhere, but a similar discussion (with some very weird suggestions) is here: http://www.proz.com/forum/office_app...ord_files.html ]

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: How to merge and split many MS Word files

    There is no straightforward way of merging a series of files then recreating the originals with the original filenames (BTW this wouldn't have any effect on footnotes/endnotes). The simplest solution is to modify your existing code so that it automatically processes all files in a given folder. For example, the following macro allows you to browse to a folder containing the documents you want to process, then replace a given string in all documents in that folder automatically. You could replace the browser code with code for a designated folder, in which case you'd need to move the files to that folder before running the macro.
    Please Login or Register  to view this content.
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1