---
title: "Working with Document in C#"
---


{{% alert color="grey" %}}

## Purpose Summary

This page explains how to work with documents programmatically at a high level.

{{% /alert %}}

The [Document](https://reference.aspose.com/words/net/aspose.words/document/) class is central in Aspose.Words. It represents a document and provides various document properties and methods, such as saving or protecting the document. You use the **Document** class as the starting point for whatever you want to perform with Aspose.Words: create a new document from scratch, open a template for a mail merge, or get different parts from a document.

The **Document** object contains all content and formatting, styles, built-in and custom properties, and the [MailMerge](https://reference.aspose.com/words/net/aspose.words.mailmerging/mailmerge/) object that is used for a mail merge. **Document** enables you to retrieve text, bookmarks, and form fields for the entire document or separate sections.

**Document** contains a collection of the [Section](https://reference.aspose.com/words/net/aspose.words/section/) objects enabling you to obtain a particular section or perform some manipulations such as copying or moving sections. The **Document** object can be saved at any time to a file or stream and also sent to a client browser.
