message: Adding promise-wrapped getSliceAsync sample
diff: @@ -3001,6 +3001,52 @@ Office.Document#setTaskFieldAsync:member(2):
  app.showNotification(error.name + ' ' + error.code + ': ' + error.message);
  }
  })();
  +Office.File.getSliceAsync:member(1):
  + - |-
  + // This sample shows how to get all the slices of a file.
  + // The asynchronous operation returns a Promise so it can be awaited.
  + private getAllSlices(file: any): Promise<any> {
  + var self = this;
  + var isError = false;
  +
  + return new Promise(async (resolve, reject) => {
  + var documentFileData = [];
  + for (var sliceIndex = 0; (sliceIndex < file.sliceCount) && !isError; sliceIndex++) {
  + var sliceReadPromise = new Promise((sliceResolve, sliceReject) => {
  + file.getSliceAsync(sliceIndex, (asyncResult) => {
  + if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
  + documentFileData = documentFileData.concat(asyncResult.value.data);
  + sliceResolve({
  + IsSuccess: true,
  + Data: documentFileData
  + });
  + } else {
  + file.closeAsync();
  + sliceReject({
  + IsSuccess: false,
  + ErrorMessage: `Error in reading the slice: ${sliceIndex} of the document`
  + });
  + }
  + });
  + });
  + await sliceReadPromise.catch((error) => {
  + isError = true;
  + });
  + }
  +
  + if (isError || !documentFileData.length) {
  + reject('Error while reading document. Please try it again.');
  + return;
  + }
  +
  + file.closeAsync();
  +
  + resolve({
  + IsSuccess: true,
  + Data: documentFileData
  + });
  + });
  + }
  Office.select:function(1):
  - |-
  // The following code example uses the select method to retrieve a binding with the id "cities" from
  