Get word Document Name? Using Office JavaScript API

57 Views Asked by At

I need a Method that get current word document name in all applications (office 365 web ,desktop, Mac).

I tried with file URL but that is got after file saved and that is different in mac and different in wed and desktop Word.

like excel in we can get current(opened) Workbook name but how can I get in word. `

 Excel.run(function (context) {
  var workbook = context.workbook;
   workbook.load(["name"]);
    return context.sync().then(function () {
    var workbookName = workbook.name;
 })
})

`

0

There are 0 best solutions below