# Create a Document Programmatically

> Build a report in a WPF click handler with ServerTextControl: formatted text, a table with a header row, an image and a header, saved as DOCX and then shown.

- **Product:** TX Text Control .NET for WPF
- **Section:** Documentation
- **Kind:** Topic
- **Path:** TX Text Control .NET for WPF > Getting Started > Document Processing > Create a Document Programmatically
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/create/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/create/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/create/llms-full.txt

---

## On This Page

- [Prerequisites](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/create/#prerequisites)
- [How Code Builds a Document](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/create/#how-code-builds-a-document)
- [Build the Document](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/create/#build-the-document)
- [What the Code Does](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/create/#what-the-code-does)
- [Run the Application](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/create/#run-the-application)
- [Build the Document in the Editor Instead](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/create/#build-the-document-in-the-editor-instead)
- [Next Steps](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/create/#next-steps)

---

## Nearby

- **Previous:** [Document Processing](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/llms.txt)
- **Next:** [Save as DOCX and PDF](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/getting-started/document-processing/save-docx-pdf/llms.txt)
