# EmbeddedFile.Data Property

> Gets the file's data. It can be either a string or binary data given as an array of bytes.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 29.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WinForms.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 Windows Forms > Reference > TXTextControl > EmbeddedFile.Data Property
- **564 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/embeddedfile/data-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/embeddedfile/data-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/embeddedfile/data-property/llms-full.txt

---

### Description

Gets the file's data. It can be either a string or binary data given as an array of bytes.

### Syntax

```csharp
public object Data { get; }
```

```vbnet
Public ReadOnly Property Data As Object
```

### Examples

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

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

Console.WriteLine($"Data: {embeddedFile.Data}");
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($"Data: {embeddedFile.Data}")
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.CreationDate Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/embeddedfile/creationdate-property/llms-full.txt)
- **Next:** [EmbeddedFile.Description Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/embeddedfile/description-property/llms-full.txt)
