Word 2010, save each page as a new doc, using first line of text RRS feed

  • Question

  • I am trying to save each page as a new doc file. 

    each page has same format: having a photo on the top and person's name right under it.

    I wanna use person's name as file name. 

    Please help me with vba code. Using word 2010.

    Thanks so much!

    Friday, October 31, 2014 3:24 PM


All replies

  • Hi Jeremy,

    To do something like this the data has to have some organization so that the name can be properly found and used.

    1. Is the name bookmarked?
    2. Is the name formatted with a specific Style?
    3. Is their more than one graphic (picture) per page?
    4. Is the picture inserted as an "inline" picture or is there text that wraps around it?
    5. Is there a hard page break at the bottom of each page?
    6. Are there other pages in this document that do not have a picture and name?

    Kind Regards, Rich ...

    Friday, October 31, 2014 8:24 PM
  • This scenario usually arises from mailmerges, where each page is delineated by a Section Break. For vba code to process such a document, see 'Split Merged Output to Separate Documents' at :

    Those macros assume the text to be used for the filename is in the first paragraph in each Section. If that's not the case for your document, you'll need to adjust the paragraph reference (e.g. .Range.Paragraphs(2).Range for the second paragraph).

    Paul Edstein
    [MS MVP - Word]

    Saturday, November 1, 2014 3:17 AM