# EmbeddedFile.FileName Property

> Gets the file's name. It can include a relative or absolute path.

- **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 > EmbeddedFile.FileName Property
- **565 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/embeddedfile/filename-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/embeddedfile/filename-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/embeddedfile/filename-property/llms-full.txt

---

### Description

Gets the file's name. It can include a relative or absolute path.

### Syntax

```csharp
public string FileName { get; }
```

```vbnet
Public ReadOnly Property FileName As String
```

### Examples

The following example configures a PDF attachment before embedding it in a WordprocessingML document by using `EmbeddedFile.FileName`.

```csharp
EmbeddedFile embeddedFile = new("terms.pdf", @"Attachments\terms.pdf", "application/pdf");

Console.WriteLine($"File Name: {embeddedFile.FileName}");
Console.WriteLine("Embedded File is ready for use.");

SaveSettings saveSettings = new() { EmbeddedFiles = new[] { embeddedFile } };
textControl.Save("contract-with-attachment.docx", StreamType.WordprocessingML, saveSettings);
```

```vbnet
Dim embeddedFile As New EmbeddedFile("terms.pdf", "Attachments\terms.pdf", "application/pdf")

Console.WriteLine($"File Name: {embeddedFile.FileName}")
Console.WriteLine("Embedded File is ready for use.")

Dim saveSettings As New SaveSettings() With { .EmbeddedFiles = New EmbeddedFile() { embeddedFile } }
textControl.Save("contract-with-attachment.docx", StreamType.WordprocessingML, saveSettings)
```

### Limitations

Read only.

---

## Nearby

- **Previous:** [EmbeddedFile.Description Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/embeddedfile/description-property/llms-full.txt)
- **Next:** [EmbeddedFile.LastModificationDate Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/embeddedfile/lastmodificationdate-property/llms-full.txt)
