# IncludeText.Filename Property

> Gets and sets the file name of the document that should be inserted. In the MailMerge component, the search path for the documents can be set using the DocumentServer.MailMerge.SearchPath property.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 15.0
- **Namespace:** `TXTextControl.DocumentServer.Fields`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXDocumentServer.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDocumentServer.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.DocumentServer.Fields > IncludeText.Filename Property
- **460 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/includetext/filename-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/includetext/filename-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/includetext/filename-property/llms-full.txt

---

### Description

Gets and sets the file name of the document that should be inserted. In the [MailMerge](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver/mailmerge/llms-full.txt) component, the search path for the documents can be set using the [DocumentServer.MailMerge.SearchPath](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver/mailmerge/searchpath-property/llms-full.txt) property.

### Syntax

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

```vbnet
Public Property Filename As String
```

### Examples

The following example uses `IncludeText.Filename` to configure filename as part of the include text workflow. The configured value is checked before the workflow continues.

```csharp
includeText.Filename = "document.docx";
if (!string.IsNullOrWhiteSpace(includeText.Filename))
{
    Console.WriteLine($"Filename: {includeText.Filename}");
}
```

```vbnet
includeText.Filename = "document.docx"
If Not String.IsNullOrWhiteSpace(includeText.Filename) Then
    Console.WriteLine($"Filename: {includeText.Filename}")
End If
```

---

## Nearby

- **Previous:** [IncludeText Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/includetext/constructor/llms-full.txt)
- **Next:** [IncludeText.TextFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-documentserver-fields/includetext/textformat-property/llms-full.txt)
