apps-for-office

Office.context.document.getFileAsync throwing errors

只愿长相守 提交于 2021-02-07 20:10:25
问题 I am getting a very strange issue whereby when I try to extract the word document as a compressed file for processing in my MS Word Task Pane MVC app the third time, it will blow up. Here is the code: Office.context.document.getFileAsync(Office.FileType.Compressed, function (result) { if (result.status == "succeeded") { var file = result.value; file.getSliceAsync(0, function (resultSlice) { //DO SOMETHING }); } else { //TODO: Service fault handling? } }); The error code that comes up is 5001.

Office.context.document.getFileAsync throwing errors

一个人想着一个人 提交于 2021-02-07 20:07:08
问题 I am getting a very strange issue whereby when I try to extract the word document as a compressed file for processing in my MS Word Task Pane MVC app the third time, it will blow up. Here is the code: Office.context.document.getFileAsync(Office.FileType.Compressed, function (result) { if (result.status == "succeeded") { var file = result.value; file.getSliceAsync(0, function (resultSlice) { //DO SOMETHING }); } else { //TODO: Service fault handling? } }); The error code that comes up is 5001.

Office.context.document.getFileAsync throwing errors

半城伤御伤魂 提交于 2021-02-07 20:02:13
问题 I am getting a very strange issue whereby when I try to extract the word document as a compressed file for processing in my MS Word Task Pane MVC app the third time, it will blow up. Here is the code: Office.context.document.getFileAsync(Office.FileType.Compressed, function (result) { if (result.status == "succeeded") { var file = result.value; file.getSliceAsync(0, function (resultSlice) { //DO SOMETHING }); } else { //TODO: Service fault handling? } }); The error code that comes up is 5001.

How can I read Excel custom properties in Office Javascript API?

旧街凉风 提交于 2020-01-14 03:06:21
问题 I have a tab pane app that needs to access the custom properties of the current MS Office document, which can be Word or Excel. There seems to be no built in way of doing this with the Office JavaScript API, but in Word, I use the Office.context.document.getFileAsync() method to return the entire file. I can then unzip it, read in the custom.xml file, and navigate through the XML to get the custom properties. However, the Office.context.document.getFileAsync() is not available in Excel. Is

Change word document style with an app for Office

我们两清 提交于 2019-12-20 02:58:06
问题 Im trying to create an app for Word Office using the Office js API. I have found how to get and set content into the word document but Im having a hard time finding how to change things like Styles (Headings, etc.) Before getting into how to do it, is it even possible? 回答1: The answer to you question is yes and now, the word api is a bit new and missing some functionalities which may make a developer life easier. First, headers are not supported in the word api, a work around for this is to

What browser / browser engine do Office Add-ins use?

你说的曾经没有我的故事 提交于 2019-12-17 16:59:47
问题 So I am trying to get started developing Office 365 Add-ins (previously Apps for Office), and I was wondering what browser or browser engine Office uses when it renders your app. I tried using JavaScript's navigator.appCodeName and navigator.appName , but due to the problem described here renders that method useless. What browser or engine do Office Add-ins use to render apps? 回答1: It depends on where Office is being used. If it's on Windows Desktop, Office Add-ins use an Internet Explorer to

Cannot debug add-in using F12Chooser in 1903

牧云@^-^@ 提交于 2019-12-14 04:21:54
问题 As of the update to 1903 Office Add-ins started using Edge as the browser. It looks like this has broken the ability to attach the F12Chooser debugger to the browser session. Is anyone else noticing this or has anyone been able to fix this? 回答1: F12Chooser is for Internet Explorer. For Office-Add-ins with Edge use "Microsoft Edge DevTools": https://docs.microsoft.com/en-us/office/dev/add-ins/testing/debug-add-ins-using-f12-developer-tools-on-windows-10 来源: https://stackoverflow.com/questions

Apps for Office: my task pane app doesn't get the licensing '?et=' license token

帅比萌擦擦* 提交于 2019-12-11 11:44:25
问题 MSDN docs say: The Office application calling you app's URL would add the following query string to it and then pass the URL: http://fooservice.com/index.htm?et= PAByAD4APAB0ACAAYQBpAGQAPQ .... (->this string goes on for a while - Mihaly KR) I've tried everything, but nothing gets ever POSTed (or GETted), no ?et parameter. The app loads fine in Office, but I want to get the client id from the token, so I could do a permanent storage on my server. I did a php page which prints all get and post

Excel JS Add-In works in Excel but not Excel Online

微笑、不失礼 提交于 2019-12-10 11:46:50
问题 I've built an Excel JS Task Pane add-in using the WoodGrove Expense Trends sample and have validated that it runs correctly in Excel 2016 on my machine. However, when I go to Excel Online and try to add the add-in (via uploading the manifest from my machine), I get "Your add-in manifest is not valid." I'm not sure what it is about this manifest that's valid on my machine but not in Excel Online. Anyone encountered this before or have any diagnosis ideas? It's somewhat akin to banging my head

How can I read Excel custom properties in Office Javascript API?

心不动则不痛 提交于 2019-12-09 05:35:24
I have a tab pane app that needs to access the custom properties of the current MS Office document, which can be Word or Excel. There seems to be no built in way of doing this with the Office JavaScript API, but in Word, I use the Office.context.document.getFileAsync() method to return the entire file. I can then unzip it, read in the custom.xml file, and navigate through the XML to get the custom properties. However, the Office.context.document.getFileAsync() is not available in Excel. Is there another way to read the custom properties? I know that the question is quite old, but since I