BuiltInDocumentPropertiesLastPrinted Property

Gets or sets the date when the document was last printed in UTC.

Namespace:  Aspose.Words.Properties
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.10.0


public DateTime LastPrinted { get; set; }

Property Value

Type: DateTime


For documents originated from RTF format this property returns the local time of last print operation.

If the document was never printed, this property will return DateTime.MinValue.

Aspose.Words does not update this property.


Shows how to work with document properties in the "Origin" category.
Document doc = new Document(MyDir + "Properties.docx");

// The properties we will work with are members of the BuiltInDocumentProperties attribute
BuiltInDocumentProperties properties = doc.BuiltInDocumentProperties;

// Since this document has been edited and printed in the past, values generated by Microsoft Word will appear here
// These values can be glanced at by right clicking the file in Windows Explorer, without actually opening the document
// Fields such as PRINTDATE, EDITTIME etc. can display these values inside the document
Console.WriteLine($"Created using {properties.NameOfApplication}, on {properties.CreatedTime}");
Console.WriteLine($"Minutes spent editing: {properties.TotalEditingTime}");
Console.WriteLine($"Date/time last printed: {properties.LastPrinted}");
Console.WriteLine($"Template document: {properties.Template}");

// We can set these properties ourselves
properties.Company = "Doe Ltd.";
properties.Manager = "Jane Doe";
properties.Version = 5;

// If we plan on programmatically saving the document, we may record some details like this
properties.LastSavedBy = "John Doe";
properties.LastSavedTime = DateTime.Now;

// When right clicking the document file in Windows Explorer, these properties are found in Properties > Details > Origin
doc.Save(ArtifactsDir + "Properties.Origin.docx");

ExpandedSee Also