BuiltInDocumentPropertiesLastSavedTime Property

Gets or sets the time of the last save in UTC.

Namespace:  Aspose.Words.Properties
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public DateTime LastSavedTime { get; set; }

Property Value

Type: DateTime
Remarks

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

Aspose.Words does not update this property.

Examples
Shows how to work with document properties in the "Origin" category.
// Open a document 
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;
properties.RevisionNumber++;

// 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");
See Also