word-web-addins

Word Web-Addin: getSliceAsync() only return First Slice of data

懵懂的女人 提交于 2021-01-12 06:31:16
问题 I am developing an office 365 word web addin , wherein I need to upload the currently opened document to my server. For which I am trying to get the file data using following code. The method getSliceAsync() is returning only first slice of data. On debugging it gives "Addin Error: Sorry, we had to restart because this addin wasn't responding" while getting second slice. I am using this link for reference : [https://docs.microsoft.com/en-us/office/dev/add-ins/word/get-the-whole-document-from

Word Web-Addin: getSliceAsync() only return First Slice of data

▼魔方 西西 提交于 2021-01-12 06:28:08
问题 I am developing an office 365 word web addin , wherein I need to upload the currently opened document to my server. For which I am trying to get the file data using following code. The method getSliceAsync() is returning only first slice of data. On debugging it gives "Addin Error: Sorry, we had to restart because this addin wasn't responding" while getting second slice. I am using this link for reference : [https://docs.microsoft.com/en-us/office/dev/add-ins/word/get-the-whole-document-from

Underline Color Word Web Add-in without Font Color

前提是你 提交于 2019-12-11 07:27:45
问题 I am working on Word web addin OfficeJS, I wanna change my underline color to red. Is it possible to change the color of underline without affecting the font color ? Attached my code below: Word.run(function (context) { var searchResults = context.document.body.search(searchResult, { ignorePunct: true }); context.load(searchResults, 'font'); return context.sync().then(function () { for (var i = 0; i < searchResults.items.length; i++) { searchResults.items[i].font.color = 'red'; searchResults

Office.context.mailbox.addHandlerAsync fails when reload the frame

别来无恙 提交于 2019-12-08 10:56:02
问题 I am implementing the pinnable taskpane in my outlook web add-in This is my code: Office.initialize = function (reason) { $(document).ready(function () { // Listen to ItemChanged event Office.context.mailbox.addHandlerAsync(Office.EventType.ItemChanged, itemChanged, function (result) { console.log(result) if (result.status === Office.AsyncResultStatus.Failed) { // here will be hit if I do a postback in the server, could also be replicated by choosing "reload frame" in the right click menu

Office Web Add-ins - Internal error when saving settings

岁酱吖の 提交于 2019-12-01 01:08:42
I'm getting an failure when trying to save my document settings. The message is the following: {"name":"Internal Error","message":"An internal error has occurred.","code":5001} My code: Office.context.document.settings.set('token', token); Office.context.document.settings.set('email', email); Office.context.document.settings.saveAsync(function (asyncResult) { if (asyncResult.error) { displayError(asyncResult.error.message); } }); The problem revealed when I reinstalled my OS (Windows 10) and does not exist in Office for Mac and Web. It happens both on PowerPoint and Word. Maybe it's something

Office Web Add-ins - Internal error when saving settings

无人久伴 提交于 2019-11-30 20:15:28
问题 I'm getting an failure when trying to save my document settings. The message is the following: {"name":"Internal Error","message":"An internal error has occurred.","code":5001} My code: Office.context.document.settings.set('token', token); Office.context.document.settings.set('email', email); Office.context.document.settings.saveAsync(function (asyncResult) { if (asyncResult.error) { displayError(asyncResult.error.message); } }); The problem revealed when I reinstalled my OS (Windows 10) and