PDA

View Full Version : Split word document on page breaks



Kramer74
08-29-2014, 01:35 AM
Hi,

I'd like to split a large document into several smaller ones on the existing page breaks within the larger document.

I also need the new document to retain all the formatting/margins etc form the original document.

Each new document also needs to be saved with the filename coming from the first few characters of the first line in the new document, up to and including this character, "]"

Is there an simple way to do this using VBA?

gmayor
08-29-2014, 02:53 AM
Are these section page breaks, manual page breaks or simply the result of text flow?

What exactly might be found in the first line?

If the document to be split is the result of a mail merge then it would make more sense to use http://www.gmayor.com/individual_merge_letters.htm or http://www.gmayor.com/MergeAndSplit.htm to re-merge to separate documents as these will take care of the issues of illegal filename characters and duplicated names etc as well as retaining the format.

If not we would need the answers to the questions before establishing a process.

Don't you have a similar question in the Microsoft Office Forums?

macropod
08-29-2014, 03:32 PM
Cross-posted and answered, before posting here, at: http://www.msofficeforums.com/word-vba/22435-split-file-using-variable-delimiter.html
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184 See also http://www.vbaexpress.com/forum/faq.php?faq=new_faq_item#faq_new_faq_item3