GetDocumentInfo

function GetDocumentInfo(): object

Description

Returns the document information: Application - the application the document has been created with. CreatedRaw - the date and time when the file was created. Created - the parsed date and time when the file was created. LastModifiedRaw - the date and time when the file was last modified. LastModified - the parsed date and time when the file was last modified. LastModifiedBy - the name of the user who has made the latest change to the document. Authors - the persons who has created the file. Title - this property allows you to simplify your documents classification. Tags - this property allows you to simplify your documents classification. Subject - this property allows you to simplify your documents classification. Comment - this property allows you to simplify your documents classification.

Returns

object

Try It

const oDocument = Api.GetDocument();
const oDocInfo = oDocument.GetDocumentInfo();
const oParagraph = Api.CreateParagraph();
oParagraph.AddText('This document has been created with: ' + oDocInfo.Application)
oDocument.Push(oParagraph);

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).