---
title: "Working with Document in Node.js"
---


The [Document](https://reference.aspose.com/words/nodejs-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](https://reference.aspose.com/words/nodejs-net/aspose.words/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](https://reference.aspose.com/words/nodejs-net/aspose.words/document/) object contains all content and formatting, styles, built-in and custom properties. [Document](https://reference.aspose.com/words/nodejs-net/aspose.words/document/) enables you to retrieve text, bookmarks, and form fields for the entire document or separate sections.

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