OfficeDev / office-js-docs

[ARCHIVED] Microsoft Office Add-ins API Reference Documentation
https://docs.microsoft.com/javascript/api/overview/office
398 stars 247 forks source link

context.applicationObject.createDocument does not return Document object #1459

Closed vmrathod closed 6 years ago

vmrathod commented 6 years ago

Article URL

https://github.com/OfficeDev/office-js-docs/blob/master/reference/word/application.md

Issue

According to documentation "context.applicationObject.createDocument" should return the "Document" object but with the latest version of Office.js API it's return "DocumentCreated"object. I want to use "getFileAsync" method after creating in memory document but I am not able to find "getFileAsync" on "DocumentCreated" object.

Rick-Kirkham commented 6 years ago

The documentation is erroneous. We are in the process of moving to a new reference documentation system. When that goes live in the next few weeks, the method description will correctly say that it returns a DocumentCreated object. The DocumentCreated object does not have a getFileAsync method. You may be thinking of the Document object in the Shared Office APIs (https://dev.office.com/reference/add-ins/shared/document) which does have a getFileAsync.