'When a call made to Word.run function, I am getting 'Word' is undefined in word 2016

Issue:

  • Here I am using an word add-in in word 2016. When a call a function which uses Word.run is giving an error as 'Word' is undefined.
  • The add-in file is working properly in office 365 desktop application as well as in browser.

NOTE: I am initialising word before calling the Word.run

What I have Checked?

  • Cleared the cache and checked out.

  • Version of Office-js is latest.

  • Using latest schema in xml i.e 1.1.

  • All the resources are defined properly in xml file.

The function call is made from a html page to a js page where the Word.run will execute. the office is initialised in the html page when the page get's loaded.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source