Personal website of Gregory K. Maxey, Commander USN (Retired)
Do you have ad-blocking software enabled? While I respect your right to do so, your donations and the minimal advertisements on this site help to defray internet and other costs of providing this content. Please consider excluding this website from blocking or turning off the blocker while browsing this site.
The information, illustrations and code contained in my "Microsoft Word Tips" are provided free and without risk or obligation.
However, the work is mine. If you use it for commercial purposes or benefit from my efforts through income earned or time saved then a donation, however small, will help to ensure the continued availability of this resource.
If you would like to donate, please use the appropriate donate button to access PayPal. Thank you!
The purpose of this Microsoft Word Help & Microsoft Word Tips page is to publish and provide an add-in that you can use to conveniently split a active document into one or more individual documents based on the selected delimiter. The user can split the document into parts defined by section breaks, pages, heading 1 style, or a user defined delimiter.
This can be useful for saving mail merged letters as individual files, or saving a complete manuscript as individual files where each file contains one chapter, etc.
Bonus Tip: A more specific process for saving mail merge letters to individual documents can be downloaded from Word MVP Graham Mayor's Downloadable Files. Download the file named MMtoDocs.zip.
The add-in uses a Userform as the UI. The UI lets the user define the delimiter, path, and file name prefix for the individual files. The add-in automatically assigns a sequential number suffix to each file created.
The UI when the add-in is first opened is illustrated below. The user chooses the delimiter and then clicks the "Pick Directory" button which then opens a dialog to select the file path.
The "User Defined" options allows the user to define there own text string as a delimiter. For example, a user may have a collection of notes divided by a string "********"
The "Pick Directory" command button uses the Office FileDialog object or a simple VBA input box depending on the Word version in use. If a dialog similar to the one shown below appears just click to select the desired directory. You don't have to type anything in the text field. In the example shown, the files will be saved in "My Documents."
Note: This dialog is available in Word versions 11.0 (Word2003) and above only. Earlier versions will use a simple inputbox for the user to input the file path.
After the user chooses the path, the file prefix textbox is enabled. In this textbox the user defines the prefix for the file name. Prefix characters are limited to the letters of the alphabet, numerals, and the characters "_,(, and )" only. When a valid file prefix is entered the Validate/Confirm Actions command button is enabled. This lets the user see and confirm the actions pending.
When the user presses OK the add-in creates and saves the individual files. If the selected delimiter is "Sections" or "Pages" the add-in will recreate the page layout of the source page in the new documents. No further user action is required.
The add-in is provided here in a zip file format: Document Splitter
That's it! I hope you have found this tips page useful and informative.
Do you want to make a payment for consulting work or donate to help support this site?
PayPal is a safe, easy way to pay online.
Use the appropriate currency "Donate" button to make a payment or donation.