The PowerPoint.run batch function must return a context.sync().
Every .then must either be fully synchronous or return a promise.
PowerPoint.run(function(context) { batch })
The context is sometimes abbreviated to "ctx"
This executes a batch script that performs actions on the PowerPoint object model.
The advantage of batching requests in PowerPoint.run() is that when the promise is resolved, any tracked range objects that were allocated during the execution will be automatically released.


PowerPoint.run ( function (context) { 

async function addSlide() { 
  await PowerPoint.run(async function(context) {

    await context.sync();

© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext