---
Product: Aspose.Email
Platform: python
Page Type: reference
Canonical URL: https://reference.aspose.org/email/python/cfbdocument
---

# CFBDocument

## Overview

`CFBDocument` is a class in Aspose.Email FOSS for Python.

Mutable Compound File Binary (CFB) document description.

This class provides 3 methods for working with CFBDocument objects in Python programs.
Available methods include: `build_storage`, `from_file`, `from_reader`.
All public members are accessible to any Python application after installing the Aspose.Email FOSS for Python package.
Properties: `major_version`, `minor_version`, `root`, `transaction_signature_number`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `root` | `CFBStorage` | Read/Write | Gets or sets the root. |
| `major_version` | `int` | Read/Write | Gets or sets the major version. |
| `minor_version` | `int` | Read/Write | Gets or sets the minor version. |
| `transaction_signature_number` | `int` | Read/Write | Gets or sets the transaction signature number. |

## Methods

| Signature | Description |
|-----------|-------------|
| `from_reader(reader: CFBReader)` → `"CFBDocument"` | Creates a CFBDocument instance from the given CFBReader |
| `build_storage(entry_id: int)` → `CFBStorage` | Returns a CFBStorage representing the storage for the specified entry ID |
| `from_file(path: Path \| str)` → `"CFBDocument"` | Loads a CFBDocument from a file path or Path object |

## Examples

```python
from aspose.email_foss.cfb import CFBDocument, CFBStorage, CFBWriter

doc = CFBDocument.from_file("archive.cfb")
new_storage = CFBStorage(name="MyStorage")
doc.root.add_storage(new_storage)
CFBWriter.write_file(doc, "modified.cfb")
```

## See Also

- [Aspose.Email for Python — Enterprise API Reference](https://reference.aspose.com/email/python-net/)