---
title: "Remove Fields C#"
---

```

## Purpose Summary

This page explains how to remove fields from a Word document using Aspose.Words.

```

Sometimes it is necessary to remove a field from a document. This may occur when it needs to be replaced with a different field type or when the field is no longer needed in the document. For example the `TOC` field when saving to HTML.

To remove a field inserted into a document using [DocumentBuilder](https://reference.aspose.com/words/net/aspose.words/documentbuilder/).[InsertField](https://reference.aspose.com/words/net/aspose.words/documentbuilder/insertfield/), use the returned [Field](https://reference.aspose.com/words/net/aspose.words.fields/field/) object, which provides a convenient [Remove](https://reference.aspose.com/words/net/aspose.words.fields/field/remove/) method for easily removing the field from the document.

The following code example shows how to remove a field from the document:

{{< gist "aspose-words-gists" "8c604665c1b97795df7a1e665f6b44ce" "remove-field.cs" >}}

```

You can download the sample file of this example from [Aspose.Words GitHub](https://github.com/aspose-words/Aspose.Words-for-.NET/blob/master/Examples/Data/Various%20fields.docx).

```
