# DocumentSettings.DocumentSubject Property

> Gets or sets the subject string of the current document. It is an empty string, if there is no subject string contained in the document.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 29.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > DocumentSettings.DocumentSubject Property
- **569 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documentsettings/documentsubject-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documentsettings/documentsubject-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documentsettings/documentsubject-property/llms-full.txt

---

### Description

Gets or sets the subject string of the current document. It is an empty string, if there is no subject string contained in the document.

### Syntax

```csharp
public string DocumentSubject { get; set; }
```

```vbnet
Public Property DocumentSubject As String
```

### Examples

The following example configures document settings for the current document by using `DocumentSettings.DocumentSubject`.

```csharp
DocumentSettings documentSettings = textControl.DocumentSettings;

documentSettings.DocumentSubject = "FY 2026 performance";
if (!string.IsNullOrWhiteSpace(documentSettings.DocumentSubject))
{
    Console.WriteLine($"Document Subject: {documentSettings.DocumentSubject}");
}

documentSettings.DocumentTitle = "Quarterly results";
documentSettings.Author = "Finance team";
```

```vbnet
Dim documentSettings As DocumentSettings = textControl.DocumentSettings

documentSettings.DocumentSubject = "FY 2026 performance"
If Not String.IsNullOrWhiteSpace(documentSettings.DocumentSubject) Then
    Console.WriteLine($"Document Subject: {documentSettings.DocumentSubject}")
End If

documentSettings.DocumentTitle = "Quarterly results"
documentSettings.Author = "Finance team"
```

---

## Nearby

- **Previous:** [DocumentSettings.DocumentKeywords Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documentsettings/documentkeywords-property/llms-full.txt)
- **Next:** [DocumentSettings.DocumentTitle Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/documentsettings/documenttitle-property/llms-full.txt)
