office-js

What is the fastest way of replacing the text of many content controls via office-js?

怎甘沉沦 提交于 2020-01-23 16:49:26
问题 I wrote the following function to replace a huge amount of CCs with specified values: /** replaceManyCCs() * * Replaces the content of many content controls, based on the replacementObject. * * @arg replacementObject A dictionary. The keys are the titles of the CCs which should be replaced. The values are the replacement values. */ function replaceManyCCs (replacementObject) { Word.run(function (context) { var time1 = Date.now(); // load the title of all content controls var CCc = context

How to get range of the text in Word document programmatically in MS Office Word add-in using JS API [duplicate]

情到浓时终转凉″ 提交于 2020-01-22 02:16:18
问题 This question already exists : Get range of the text in Word document programmatically in MS Office Word add-in using JS API [closed] Closed 20 days ago . I need to get numerical range of the text(example: startpoint-30, endpoint-35) in word document programmatically (via MS Office add-in), but I can't find how to do that via JS. Here is an example: Hello my friend Pete, I talked to your friend Robert yesterday and he told about his friend Ann. So, I need to get range of any word i want and

Word addin doesn't work on word online

回眸只為那壹抹淺笑 提交于 2020-01-17 06:14:29
问题 Developing a Word addin were you can pick a docx-file and it gets inserted in the new blank document - a templateHandler sort of. Every docx-file has a footer that is containing several RTF - contentControlers. Before a document is loaded (insertFileFromBase64) there is a thisDocument.body.clear() in the code. In local wordclient there is no problem to load the different docs, but in word online I get an error regarding body.clear() : The action is not supported with Word Online EDIT: The

Why does a Word 2016 Add-in (office.js) Ribbon Tab not show for some Mac users?

一笑奈何 提交于 2020-01-17 06:12:10
问题 The following manifest was approved by Microsoft and is in the Office Store as an add-in for Word 2016 called "Annotate PRO." The manifest should create a new ribbon named 'Annotate.' It does this correctly in Windows, Word Online (Windows and Mac, Chrome and Safari), and on some Macs. On most Macs (especially El Capitan) it does not create a Ribbon although the Add-in does work. You just have to choose it from 'My Add-ins' every time you open a document. It does not appear on many Macs. Why?

Why does a Word 2016 Add-in (office.js) Ribbon Tab not show for some Mac users?

孤街醉人 提交于 2020-01-17 06:11:08
问题 The following manifest was approved by Microsoft and is in the Office Store as an add-in for Word 2016 called "Annotate PRO." The manifest should create a new ribbon named 'Annotate.' It does this correctly in Windows, Word Online (Windows and Mac, Chrome and Safari), and on some Macs. On most Macs (especially El Capitan) it does not create a Ribbon although the Add-in does work. You just have to choose it from 'My Add-ins' every time you open a document. It does not appear on many Macs. Why?

how to automate automatics addition of Office Plugin in excel file basically similar XLSTART folder work. Office Addin

陌路散爱 提交于 2020-01-17 06:06:17
问题 I am looking for option to automatically add my addins to users excel file. before 2013 office we had a xla and xlam file which i could place in XLSTART folder of office excel and then when i open office, it will prompt me to include addins in excel file if its not trusted or automatically included it if its already from trusted source. My office addin is not released to office store, it will be in user organization catalog. Basically my workflow would be -> when i click on export to excel

Settings API for office add-ins (Office.js) is not working in Excel

醉酒当歌 提交于 2020-01-16 09:09:08
问题 In my Excel add-in, I save settings via the common Settings API, like this: Office.context.document.settings.set("user-selected-stock","MSFT"); Office.context.document.settings.saveAsync(); Starting about a week ago, many of my add-in users have begun complaining that this feature is no longer working. I was able to confirm that the problem is an issue with Excel, because a user was able to reproduce the issue with the People Graph add-in, which is built by Microsoft and preinstalled by

How to retrieve the Query string value from web word instance

↘锁芯ラ 提交于 2020-01-16 08:44:07
问题 I'm creating a web add-in for Word targeting Word Online. When a document is opened using Word Online, the URL will contain a file name. I am trying to retrieve that file name. To retrieve this URL I tried using window.location href, but it is fetching my hosted addin web application URL. Is it possible to get the Word Online URL? Sample Code : function getParameterByName(name, url) { if (!url) url = window.location.search; name = name.replace(/[\[\]]/g, '\\$&'); var regex = new RegExp('[?&]'

OfficeJs SSO getAccessTokenAsync returns error code 3000,Access denied

≡放荡痞女 提交于 2020-01-15 12:22:53
问题 I have followed all steps but I had some changes due to my unique setup. I had unique setup where none of the services were hosted on azure so I used aws azure active directory integration. I used following tutorial to configure AWS Azure Active directory. I followed this tutorial to configure sso for my word addin After following tutorial I got this below error getAccessTokenAsync return result = { status: "failed", error: { code: 7000, message: "You don't have sufficient permissions for

OfficeJs SSO getAccessTokenAsync returns error code 3000,Access denied

╄→尐↘猪︶ㄣ 提交于 2020-01-15 12:21:28
问题 I have followed all steps but I had some changes due to my unique setup. I had unique setup where none of the services were hosted on azure so I used aws azure active directory integration. I used following tutorial to configure AWS Azure Active directory. I followed this tutorial to configure sso for my word addin After following tutorial I got this below error getAccessTokenAsync return result = { status: "failed", error: { code: 7000, message: "You don't have sufficient permissions for