Consulting

Results 1 to 5 of 5

Thread: Split file into multiple documents using chosen delimiter and filename

  1. #1

    Split file into multiple documents using chosen delimiter and filename

    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!

  2. #2
    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.
    Graham Mayor - MS MVP (Word) 2002-2019
    Visit my web site for more programming tips and ready made processes
    http://www.gmayor.com

  3. #3
    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?

  4. #4
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    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-m...ps-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.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

  5. #5
    Microsoft Word MVP 2003-2009 VBAX Guru gmaxey's Avatar
    Joined
    Sep 2005
    Posts
    3,340
    Location
    Greg

    Visit my website: http://gregmaxey.com

Posting Permissions

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