As explained in this SO post, using JavaScript/JQuery, we can convert .docx
files to html. We need to display this html in the default browser. In our Office.js add-in for WORD, we can get an html from WORD document but we are not sure how we display it in the browser. For example: user clicks a button in the task pane of the Add-in==>Add-in gets the html from the active Word document==>the Add-in code displays that html in the default browser. Question: Is there any Office.js API etc that will help us display that HTML in default browser?
Asked
Active
Viewed 446 times
0

nam
- 21,967
- 37
- 158
- 332
2 Answers
1
I assume there's some reason why displaying it in a tab within the task pane isn't acceptable. (If it is, then that's something to consider.) There's also the Dialog API. It's a window of the default browser, but it doesn't have the browser ribbon or menu bars. If you want a full blown browser window to open, I don't think that there is an API in Office.js that will do that. You might take a look at the standard window.open() method.

Rick Kirkham
- 9,038
- 1
- 14
- 32
-
Thank you. This was very helpful (with good reference) specially at a time when there are less people to be able to response on the new `Office.js` Add-ins related topics as this is still new and still evolving. – nam Oct 16 '18 at 15:48
0
There are many ways from which you can retrieve data from API and display on browser or DOM , in nodejs , the code would be somewhat like
//the npm library useful
const request = require('request');
request({
url: 'www.example.com',
json:true
}
, (error,response,body)=>{
//your response will be in response object! Then you can easily display it to browser
});

nam
- 21,967
- 37
- 158
- 332

killer Bee
- 11