# Merge Word documents into one file, in the right order

> Markdown version of https://stella.sh/how/documents/merge-word-documents for agents and LLMs.
> Combine separate Word files, such as one per chapter, into one document in story order with each part on a new page, with Word's Text from File or Stella (stella.sh).

In Word, open the first file, put the cursor at the end, add a page break, then use Insert, Object, Text from File to pull in the next one. Do it one file at a time: picking several at once inserts them in file-list order, which puts Chapter 10 before Chapter 2. Stella (stella.sh) joins the files on your computer by chapter number, starts each one on a new page, and keeps headings, italics and pictures.

- Checked: 13 November 2026
- Stella does it on: Windows, Mac, Linux

## Stella doing it

Recorded 13 November 2026 on Linux (Omarchy) with Claude Code with Opus, on a Claude plan.
Result: One 14-chapter manuscript in under 4 minutes. Checked afterwards against an answer key written before the run: all 14 chapter headings in story order (Chapter 10 after Chapter 9, Epilogue last), all 84 paragraphs present and in order, every chapter after the first on a new page, the Chapter 5 picture kept, italics and Heading styles kept, and the chapter files unchanged. The novel, its chapters and the map picture are fictitious, made for this run. The work is sped up 14×.

Video (51 s): https://stella.sh/media/proofs/documents/merge-word-documents/proof.mp4

Transcript:

- 0:00 Stella on a Linux computer. Fourteen chapter files are in Documents/My Novel.
- 0:01 The prompt: put them into one Word document in the right order, each chapter on a new page.
- 0:17 Stella replies that it's combining the chapters, the originals won't change, and it will flag gaps or stray drafts.
- 0:23 Joining the chapters, sped up 14×.
- 0:36 Done: one manuscript running Prologue, Chapters 1 to 12, Epilogue, ordered by chapter number rather than file name.

What Stella does:

1. Finds the chapter files in the folder you name (here, 14 files in Documents/My Novel)
2. Orders them by what they are, not by file name: Prologue, Chapters 1 to 12, then Epilogue, so Chapter 10 doesn't land after Chapter 1
3. Builds one new Word document with a page break before every chapter, carrying over each chapter's heading style, italic lines and the map picture in Chapter 5
4. Saves it as My Novel - Full Manuscript.docx next to the chapters and leaves every chapter file as it was
5. Reports the order it used and that nothing was missing or duplicated

## The prompt to paste

```text
I wrote my book as separate Word files, one per chapter, in the My Novel folder in Documents. Put them all together into one Word document in the right order, with each chapter starting on a new page.
```

## Join them yourself in Word

1. **Check the order before you start.** Sorted by name, files run Chapter 1, Chapter 10, Chapter 11, Chapter 12, Chapter 2, and Epilogue sorts before Prologue. Write down the real order, or rename the files with two-digit numbers (01, 02 … 12) so the folder sorts correctly.
2. **On Windows: Text from File.** Open the first file and save it under a new name, such as Full manuscript.docx. Press Ctrl+End, choose Insert, Page Break, then Insert, Object (the small arrow), Text from File, and pick the next chapter. Repeat for each file in order.
3. **On a Mac: Insert, File.** In Word for Mac, open the first chapter, save a copy under a new name, go to the end, choose Insert, Break, Page Break, then Insert, File (called Text from File in some versions) and pick the next chapter. Repeat in order.
4. **Check headings and pictures.** Open the Navigation Pane (View, Navigation Pane) and check every chapter title is listed once, in order. Scroll to any chapter with a picture to make sure it came across, and check that page and section breaks didn't change your margins.
5. **Free alternative: LibreOffice Writer.** The free LibreOffice Writer has Insert, Text from File too. Open the first chapter, add a page break with Ctrl+Enter, insert the next file, and save the result as a .docx.

## Where Stella stops

- Every chapter's text and formatting came through here, but page setup that differs per file (different margins or headers per chapter) follows the first file unless each chapter keeps its own section.
- Comments and tracked changes come across as they are. Stella doesn't accept or reject them unless you ask.
- Stella decides the order from chapter numbers and names like Prologue and Epilogue. If your files are called things like “The storm” and “Arrival”, say the order in the prompt.
- The joining runs on your computer. The AI model you use in Stella sees file names and whatever chapter text it reads to check the result.
- Recorded on Linux without Word installed. The manuscript is an ordinary .docx that opens in Word, Pages or Google Docs.

## Questions

**Why did Word merge my chapters in the wrong order?**
Selecting several files in Text from File inserts them in the order the dialog lists them, which is alphabetical: Chapter 10 comes before Chapter 2. Insert one file at a time, or rename them 01, 02 and so on first.

**How do I start each chapter on a new page?**
Put a page break (Ctrl+Enter, or Cmd+Enter on a Mac) before each inserted file. If your chapter titles use the Heading 1 style, you can instead set that style's paragraph option to Page break before, which does it everywhere at once.

**Will the merged document keep my headings for a table of contents?**
Yes, when the chapter titles use Word's Heading styles. Stella kept them here, so References, Table of Contents works on the manuscript straight away.

**Can I get a PDF of the whole book instead?**
Yes. Save the merged document as a PDF from Word (File, Save As, PDF), or ask Stella for a PDF alongside the .docx. If you only have a PDF and need to edit it, [convert the PDF to Word](https://stella.sh/how/documents/convert-pdf-to-word) first.

**Is Stella free for this?**
Yes. Free with the ChatGPT or Claude plan you already have. Sign in with your ChatGPT plan, or use your Claude plan through Claude Code, and this task costs nothing extra. New accounts also get a small free trial of Stella’s own models.

**Can I control what Stella changes on my computer?**
Yes. Stella works on Windows, Mac and Linux with your own files and shows each step in the chat, so you can watch it and stop it at any point. Tell it what it may not do, as the prompts on these pages do (“don't delete anything without asking”). In the Downloads recording it deleted nothing until it was told to go ahead. It also refuses commands that would wipe a whole disk, your home folder or system folders.

Sources: [Microsoft: Insert a document in Word](https://support.microsoft.com/en-us/word/insert-a-document-in-word).

## Related problems

- [Find and replace across multiple Word documents at once](https://stella.sh/how/documents/find-and-replace-in-multiple-word-documents.md)
- [Convert many Word documents to PDF at once](https://stella.sh/how/documents/convert-word-documents-to-pdf-in-bulk.md)
- [Make a family cookbook from recipes scattered across files](https://stella.sh/how/documents/make-a-cookbook-from-your-recipes.md)
- [Convert a PDF to a Word document you can actually edit](https://stella.sh/how/documents/convert-pdf-to-word.md)
- [Compare two Word documents for differences](https://stella.sh/how/documents/compare-two-word-documents.md)
- [Accept all changes in Word and remove the comments](https://stella.sh/how/documents/accept-tracked-changes-in-word.md)

Get Stella: https://stella.sh/download. Free with the ChatGPT or Claude plan you already have.
