I have a macro where I merge all RTF (or doc) files in a folder into one word document and create a Table of Contents. But I am trying to figure how to get it to sort before merging.
So my files are label as:
Output 01 - XXXX.rtf
Output 02 - YYYY.rtf
Output 03 - ZZZZ.rtf
....
Output 09 - AAAA.rtf
So I have created this macro to merge all my RTF files in a folder together. But it seem to merge it out of order. With the code I posted below, it copies in this order: 09,08,07,01,02,03,05,06,04... When I actually want it to copy the file in numerical order, 01,02,03,04,05,06,07,08,09. So what can I add on to this code to get it to do that?
Overall, I am hoping this macro can merge any number of outputs, since depending on the project the number of outputs varies. The first part of the file name is always the same with exception of the numbering (Output XX).
Please Login or Register to view this content.
Bookmarks