The following code snippet gets the author and title of the document and writes these property values to the console.
Word.run(function (context) {
var document = context.document;
document.properties.load("author, title");
return context.sync()
.then(function () {
console.log("The author of this document is " + document.properties.author + " and the title is '" + document.properties.title + "'");
});
});
}
, API- Office.js load()
, , . ( load()
, .)