# Section Behaviour when Merging Documents

> When documents with different section structures are merged using Selection.Load, Append, or clipboard operations, TX Text Control combines sections following MS Word conventions. The inserted document format takes priority in the first section, and original formatting applies afterward.

- **Author:** Bjoern Meyer
- **Published:** 2013-01-31
- **Modified:** 2026-04-28
- **Description:** When documents with different section structures are merged using Selection.Load, Append, or clipboard operations, TX Text Control combines sections following MS Word conventions. The inserted document format takes priority in the first section, and original formatting applies afterward.
- **2 min read** (330 words)
- **Tags:**
  - Tutorial
  - Sections
  - Merging
- **Web URL:** https://www.textcontrol.com/blog/2013/01/31/section-behaviour-when-merging-documents/
- **LLMs URL:** https://www.textcontrol.com/blog/2013/01/31/section-behaviour-when-merging-documents/llms.txt
- **LLMs-Full URL:** https://www.textcontrol.com/blog/2013/01/31/section-behaviour-when-merging-documents/llms-full.txt

---

TX Text Control X9 is going to have separate headers and footers for **Odd** and **Even** pages. In combination with **First Page Headers**, **First Page Footers**, different sections and the new per section *restartable* page numbering, headers and footers can get a very complex structure.

The current version TX Text Control X8 also implements many different section combinations. In the next couple of blog entries, I am going to introduce special section situations where TX Text Control implements a number of standard conventions.

Consider the following situation. **Document 1** consists of 1 page and a section header. **Document 2** has two sections and no headers and footers:

![Section behaviour when merging documents](https://s1-www.textcontrol.com/assets/dist/blog/2013/01/31/a/assets/header_1.webp "Section behaviour when merging documents")![Section behaviour when merging documents](https://s1-www.textcontrol.com/assets/dist/blog/2013/01/31/a/assets/header_2.webp "Section behaviour when merging documents")The second document is inserted into document 1 using **Selection.Load**, **Append** (StartWithNewParagraph) or clipboard operations.

![Section behaviour when merging documents](https://s1-www.textcontrol.com/assets/dist/blog/2013/01/31/a/assets/header_3.webp "Section behaviour when merging documents")These documents, the sections and headers and footers must be combined somehow in a way that makes sense. Over the years, conventions have been developed how such situations are resolved. The resulting document is a combination of the different sections. The following illustration shows how the resulting 2 sections are merged:

![Section behaviour when merging documents](https://s1-www.textcontrol.com/assets/dist/blog/2013/01/31/a/assets/header_4.webp "Section behaviour when merging documents")As you can see, the header has been moved to page 2. In fact, section 1 of document 1 (**1a**) has been merged with section 1 of document 2 (**2a**) where the format of the newly inserted document has priority (**2a**).

On page 2, the format of section 1 of document 1 (**1a**) is used, so that the header is applied to the second section on page 2.

This merge logic matches the behaviour of other word processors such as MS Word.

---

## About Bjoern Meyer

As CEO, Bjoern is the visionary behind our strategic direction and business development, bridging the gap between our customers and engineering teams. His deep passion for coding and web technologies drives the creation of innovative products. If you're at a tech conference, be sure to stop by our booth - you'll most likely meet Bjoern in person. With an advanced graduate degree (Dipl. Inf.) in Computer Science, specializing in AI, from the University of Bremen, Bjoern brings significant expertise to his role. In his spare time, Bjoern enjoys running, paragliding, mountain biking, and playing the piano.

- [LinkedIn](https://www.linkedin.com/in/bjoernmeyer/)
- [X](https://x.com/txbjoern)
- [GitHub](https://github.com/bjoerntx)
