Question : How to Split a Ms Word Doc into Several Ms Word Docs using VBA?

#1 - I have a Word document that contains many pages. I want to split the pages and save each page into a new Word document using VBA macro. Is this possible?

#2 - My Word document contains custom mergefield properties. Can I save these properties in the new Word document as well when splitting the pages?

Answer : How to Split a Ms Word Doc into Several Ms Word Docs using VBA?

I would do this:

start recording a macro

edit / goto page 2
place bookmark
edit/go to page 1
select till bookmark
copy
start new document
paste
save as (generate file name from page #) and close
return to the main document


stop recording the macro
review the vba code it generated, and put up a loop until end of document is reached


#2 - most likely mergefields will be copied over to the new document, but whether new document will know everything about the source, is a matter of major experimentation.
Random Solutions  
 
programming4us programming4us