# EmbeddedFile.LastModificationDate Property

> Gets or sets the date the file was last modified. When a document is saved and this property is null, the modification date of the embedded file is set to the modification date of the containing document.

- **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.LastModificationDate Property
- **678 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/embeddedfile/lastmodificationdate-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/embeddedfile/lastmodificationdate-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/embeddedfile/lastmodificationdate-property/llms-full.txt

---

### Description

Gets or sets the date the file was last modified. When a document is saved and this property is null, the modification date of the embedded file is set to the modification date of the containing document.

### Syntax

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

```vbnet
Public Property LastModificationDate As DateTime?
```

### Examples

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

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

embeddedFile.LastModificationDate = DateTime.Today;
if (embeddedFile.LastModificationDate != null)
{
    Console.WriteLine("Embedded File: Last Modification 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.LastModificationDate = Date.Today
If embeddedFile.LastModificationDate IsNot Nothing Then
    Console.WriteLine("Embedded File: Last Modification 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.FileName Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/embeddedfile/filename-property/llms-full.txt)
- **Next:** [EmbeddedFile.MIMEType Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol/embeddedfile/mimetype-property/llms-full.txt)
