1. Welcome! Please take a few seconds to create your free account to post threads, make some friends, remove a few ads while surfing and much more. ClutchFans has been bringing fans together to talk Houston Sports since 1996. Join us!

Splitting a Word File Into Separate Docs Based on Footer?

Discussion in 'BBS Hangout' started by Lil Pun, Sep 24, 2020.

  1. Lil Pun

    Lil Pun Contributing Member

    Joined:
    Oct 6, 1999
    Messages:
    34,132
    Likes Received:
    1,021
    I am attempting to separate a single Word document into multiple Word documents. Each point of separation is different as some documents will consist of 5 pages, 6 pages, and so on. The one area that i see that could be used for a point of separation js the footer on each page as it changes each time a new document would need to be made. So the footer may say Smith for the first 7 pages but then say Williams for the next 4 and then Johnson for the next 8 and so on.



    Is there a functionality built into Word that could look at the footer and successfully split the document into multiple files based on this criteria while keeping everything in the document or is this something that would need a macro? If it would require a macro, does anybody have one where this would work?
     
  2. heypartner

    heypartner Contributing Member

    Joined:
    Oct 27, 1999
    Messages:
    62,564
    Likes Received:
    56,282
    When your footer changes with a new name, is that point actually a new Section of the document?

    If you have a Section break at each point the footers change (very possible), VBA can easily split at Section Breaks.

    Google: "word macro split document at section break" for many examples

    here's an example, not to say I recommend this (it was just the top Google hit), but it does demonstrate what you're after.
    https://www.extendoffice.com/documents/word/966-word-split-documents-into-multiple-documents.html
     
    Lil Pun and Invisible Fan like this.
  3. heypartner

    heypartner Contributing Member

    Joined:
    Oct 27, 1999
    Messages:
    62,564
    Likes Received:
    56,282
    also, if the changing footer is not at a Section Break, then the footer likely uses Field Codes of some sort, so splitting might not be as straightforward, or it still could be. Tell us what makes the Footer change text.

    This might help you determine what the Footer is using, in the event my previous post about Section Breaks doesn't apply to your document:

    https://support.microsoft.com/en-us...r-footer-dc62245f-b6af-45b2-a521-17753fc3539e

    If it's a StyleRef, that could be a good boundary at which to split, too. (Other codes,,,,not so much.)
     
    #3 heypartner, Sep 24, 2020
    Last edited: Sep 24, 2020
    Lil Pun likes this.
  4. Lil Pun

    Lil Pun Contributing Member

    Joined:
    Oct 6, 1999
    Messages:
    34,132
    Likes Received:
    1,021
    Yeah, I have section breaks between each person. I saw that link when I searched before posting this thread but it looks like the VBA scripts separate by delimiter, which I guess I could enter at each section break and then run that script to save some time. The next one looks like it just separates by each page. It looks like you have to get their Kahoot add-on to do it by section break. I'll keep looking for scripts though.

    Thanks for the info. I appreciate it.
     

Share This Page

  • About ClutchFans

    Since 1996, ClutchFans has been loud and proud covering the Houston Rockets, helping set an industry standard for team fan sites. The forums have been a home for Houston sports fans as well as basketball fanatics around the globe.

  • Support ClutchFans!

    If you find that ClutchFans is a valuable resource for you, please consider becoming a Supporting Member. Supporting Members can upload photos and attachments directly to their posts, customize their user title and more. Gold Supporters see zero ads!


    Upgrade Now