I am writing an office add-in with angularjs, i need to get and set document title (that seen at that the top of the document).
this is my code:
function run() {
Word.run(function (context) {
var properties = context.document.properties;
context.load(properties);
return context.sync()
.then(function() {
console.log('thisDocument.properties.title', properties.title);
})
})
.catch(function(error) {
OfficeHelpers.UI.notify(error);
OfficeHelpers.Utilities.log(error);
});
}
but in console didn't print the title of document!