# Javascript: TXTextControl.IncludeTextField.fileName Property

> Specifies 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 Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 25.0
- **Path:** TX Text Control .NET Server > Reference > JavaScript API > Javascript: TXTextControl.IncludeTextField.fileName Property
- **215 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-includetextfield/filename-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-includetextfield/filename-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-includetextfield/filename-property/llms-full.txt

---

### Description

Specifies 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.

### Syntax

```javascript
<string> TXTextControl.IncludeTextField.fileName
```

### Examples

The following example demonstrates `TXTextControl.IncludeTextField.fileName` in a practical document-editing workflow. It specifies 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.

```javascript
function inspectFileName(includeTextField) {
    const fileName = includeTextField.fileName;
    console.log("file name:", fileName);
}
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.IncludeTextField.bookmark Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-includetextfield/bookmark-property/llms-full.txt)
- **Next:** [Javascript: TXTextControl.IncludeTextField.preserveFormatting Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/javascript/txtextcontrol-includetextfield/preserveformatting-property/llms-full.txt)
