TX Text Control .NET Server

CreationDate Property

Property|Introduced in 29.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

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

public DateTime? CreationDate { get; set; }

Examples

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

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