Introduced in 2014 March for Office 2016.
The RequestContext object facilitates requests to the Office application.
This uses application specific APIs.
Because the Add-in and the Office application run in two different processes, request context is required to get access to the Office application from the add-in.
A request context is created as shown and this object has two methods.
var ctx = new Excel.RequestContext();
ctx.sync - (Previously executeAsync when in preview). Submits the request queue to the office application and returns a promise object, which can be used for chaining further actions
ctx.load - Fills the proxy object with objects and properties that need to be loaded.
Async / Await
© 2018 Better Solutions Limited. All Rights Reserved. © 2018 Better Solutions Limited TopPrevNext