PDA

View Full Version : Split file into multiple documents using chosen delimiter and filename



davidTassie
10-22-2014, 10:37 PM
I've been playing with the Split file into multiple documents using chosen delimiter and filename example on this site and it works quite well, but i want to be able to retain the formatting of the original text in each of the new documents. Is there an easy way to do this?

Thanks! :yes

gmayor
10-23-2014, 10:17 PM
The short answer is no, because of the way Word creates documents from multiple independent 'layers'. The best you can achieve is to create the new documents from a template that is the document you are splitting. I don't know which macro you are referring and thus what method it uses to insert the split document range as formatted text; but when you create a document using the original document as the template that document will contain all the original document content, which will need to be deleted or overwritten.

If the original document was created from a mail merge, it would make more sense to split during the merge. I have several merge splitting tools available on my web site, of which http://www.gmayor.com/individual_merge_letters.htm is usually appropriate.

davidTassie
10-29-2014, 10:15 PM
Thanks for you're response gMayor.

Someone else posted another bit of code on here in the last couple of days, but now that i've gone back to look for it it has dissapeared! Is there a way to get that post back?

macropod
10-30-2014, 02:54 AM
There seems to have been a system crash here, so a lot of posts over the past few days have gone. I posted a link to: http://www.msofficeforums.com/mail-merge/21803-mailmerge-tips-tricks.html, which has some 'splitter' code under the heading 'Split Merged Output to Separate Documents'. In any event, the code you're referring to would have been included in the email message the forum sent you about the post.

gmaxey
10-30-2014, 12:49 PM
You might try: http://gregmaxey.mvps.org/word_tip_pages/document_splitter.html