Document Editing Problems

How to Split Word Pages into Separate Files with Automatic File Names

Muhammad TalhaMuhammad Talha Nov 13, 2026 869 views

Question details

The user needs to split a multi-page Microsoft Word document into individual files and automatically name each file using a value from an address or content control.

Product
Microsoft Word
Device & OS
not provided
Scenario
A multi-page Word document must be split into separate files, with each file named from a content control or address value instead of manually typed names.
Observed behavior
Word does not provide a built-in split-by-page command; the task requires a VBA macro or manual page-by-page saving.
Before you start

Before running any macro, display hidden formatting in Word by choosing Home > Show/Hide ¶ so you can see page breaks, and verify that the content control text you plan to use as a filename does not contain invalid characters such as / \ : * ? " < > or |.

Solution 1Recommended

Use a VBA Macro to Split Pages and Apply Automatic File Names

Use this VBA method when you need Word to automatically save each page as a separate file and name it from a content control or address value.

Word has no built-in command for this task. The macro can split the document by page, read the required content control value, clean the proposed filename, allow you to confirm the name, and save each page as its own file.

1
Open the Word VBA editor

In Microsoft Word, press Alt+F11 to open the VBA editor.

2
Insert a new module

Click Insert > Module in the VBA editor menu to create a module for the macro code.

3
Paste the page-splitting macro

Paste a VBA macro that loops through pages, reads the source content control or address value, and prepares a filename with invalid characters removed.

4
Run the macro

Close the VBA editor, go to View > Macros in Word, select the macro, and click Run.

5
Confirm each filename

In the input box that appears, review or edit the proposed filename, then confirm to save that page as a separate file.

Macro-enabled document: Save the Word document as .docm if you want to keep the macro stored with that file for later use.
Free Microsoft Office alternative

Use WPS Office as a Free, Lightweight Alternative for Word Document Tasks

For everyday Word-compatible editing, WPS Office is a free, lightweight alternative that opens and saves .docx files with high compatibility, offers a familiar ribbon interface, and helps you migrate multi-page documents without losing formatting. For the specific page-splitting automation in this article, run the Word VBA macro described above.

Opens, edits, and saves Microsoft Word .docx files with strong format compatibility.Free to download and use for everyday document editing.Familiar ribbon interface reduces the learning curve when switching from Word.Lightweight and easy to install for working with multi-page documents.
microsoft office alternative - wps office

Frequently Asked Questions

Can I split a Word document into separate files without a macro?

No. Microsoft Word has no built-in command to split pages into individual files and name them automatically. You must use a VBA macro or manually copy and save each page.

How do I use a content control value as the file name?

In the VBA macro, read the text from the first content control on the page, clean it to remove invalid characters, and pass the result to the SaveAs filename parameter.

Which characters cannot be used in automatically generated file names?

Windows file names cannot contain / \ : * ? " < > or |. The macro should replace or remove these before saving.

Can the macro let me edit each filename before saving?

Yes. The macro can show an input box with the proposed name so you can review or change it before the page is saved.