# EmbeddedFile.CreationDate Property

> Gets or sets the file's creation date. When a document is saved and this property is null, the creation date of the embedded file is set to the creation date of the containing 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 > EmbeddedFile.CreationDate Property
- **662 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/embeddedfile/creationdate-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/embeddedfile/creationdate-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/embeddedfile/creationdate-property/llms-full.txt

---

### Description

Gets or sets the file's creation date. When a document is saved and this property is null, the creation date of the embedded file is set to the creation date of the containing document.

### Syntax

```csharp
public DateTime? CreationDate { get; set; }
```

```vbnet
Public Property CreationDate As DateTime?
```

### Examples

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

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

embeddedFile.CreationDate = DateTime.Today;
if (embeddedFile.CreationDate != null)
{
    Console.WriteLine("Embedded File: Creation Date is available.");
}

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")

embeddedFile.CreationDate = Date.Today
If embeddedFile.CreationDate IsNot Nothing Then
    Console.WriteLine("Embedded File: Creation Date is available.")
End If

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

---

## Nearby

- **Previous:** [EmbeddedFile Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/embeddedfile/constructor/llms-full.txt)
- **Next:** [EmbeddedFile.Data Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/embeddedfile/data-property/llms-full.txt)
