word-addins

How do I make MS Word add-in trust self signed certificate?

痞子三分冷 提交于 2021-02-11 13:23:29
问题 We are mostly in our organization working locally using our extensive LAN and for our internal servers we don't use https. Though all new addins from MS Office demand that the requests use HTTPS, thus I created a self-signed certificate in one of our internal servers, from which the addin's manifest.xml fetches the html and js code. The problem is that, since MS Word uses IE 11 embedded therein, we get that annoying security warning on the taskpane addin. How do I make MS Word add-in trust a

Use Office.js APIs from outside an Office Add in

旧街凉风 提交于 2021-02-04 19:42:40
问题 In the Office.js docs one reads the following about the new ExecuteAsync() method/pattern: "This also allows us to use the same APIs even outside of an Excel add- in. Imagine, for example, that you wanted to call Excel APIs against an > Excel workbook stored in OneDrive, but you wanted to do so from a stand-> alone web application, rather than one running inside Office 2016 for Windows or Office Online. This async model lends itself well to that capability." Nevertheless, I wasn't able to

MS WORD VSTO Add-in: Exception reading manifest from file

三世轮回 提交于 2020-06-01 06:53:11
问题 I'm getting the following error during a loading of a Microsoft WORD VSTO Add-in that I created using VS2019 on Windows 10 Pro . The adding was loading fine before. Question: What could have been the cause of the error and how can the issue be resolved? Found some similar issues online (like this one) but still no luck. Error : Name: From: file:///C:/DotNet2019/VSTO/MyWORDAddinProj/bin/Debug/MyWORDAddinProj.vsto ************** Exception Text ************** System.Deployment.Application

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('[?&]'

Word insertOoxml method returning Error: Unknown for all input

你说的曾经没有我的故事 提交于 2020-01-01 06:46:10
问题 I have an existing Word Add-In solution that has been working well for a long time that now cannot insert OOXML content into Word documents. Trying to break this down I can't get the insertOoxml method to work under any circumstance. To reproduce: await Word.run(async (context) => { context.document.getSelection().insertOoxml(theOoxml, 'Start'); await context.sync(); }); Where theOoxml can be any valid Ooxml string. The reference example I have been using is: <pkg:package xmlns:pkg="http:/

Disable Word Online platform when publishing office js application to store

天涯浪子 提交于 2019-12-25 02:16:11
问题 Is it possible to publish office js Word plugin for Word 2016+ but not for Word Online platform? 回答1: All apps and add-ins submitted to the Office Store must comply with the Office Store Validation Policies Specifically section 4.12.1, "Your add-in must work across all platforms that support the methods that you define in the Requirements element in your add-in manifest." For details about which platforms support which methods, see Office Add-in host and platform availability. 来源: https:/

On-click event in Add-in created with “yo office” gets invoked for all open documents

一世执手 提交于 2019-12-24 06:40:53
问题 I created react-based word JS plugin with YO OFFICE. What I noticed is that when I open two different word documents (word, online word, mix'n'match) with my plugin loaded then interactions with one instance propagate to another instance. So, context actions supposed to be applied for one word document get applied to all open documents. This is not expected. Any ideas what I'm doing wrong? 回答1: "Yo office" uses BrowserSync for debugging, which has the nice effect of automatically refreshing

Office Word JS - Content Control from Table Selection

為{幸葍}努か 提交于 2019-12-11 03:39:43
问题 I am working on a Word add-in, using the Office JS API, trying to add a Content Control around a Table Binding in the document. The issue I am experiencing is after the Binding around the table is selected, using goToByIdAsync() , the Content Control is created around the last row of the table only, not the selection. Returning the value of ctx.document.getSelection() I can see the selected Range is only the last row in the Selected Table. I need to use the Binding object to know the selected

How can i get the document title in Office 365 JavaScript API?

妖精的绣舞 提交于 2019-12-11 02:12:09
问题 I am writing an office add-in with angularjs, i need to get and set document title (that seen at that the top of the document). this is my code: function run() { Word.run(function (context) { var properties = context.document.properties; context.load(properties); return context.sync() .then(function() { console.log('thisDocument.properties.title', properties.title); }) }) .catch(function(error) { OfficeHelpers.UI.notify(error); OfficeHelpers.Utilities.log(error); }); } but in console didn't

How to re-add a deleted VSTO Add-In

五迷三道 提交于 2019-12-10 14:53:15
问题 I've got a strange issue with a Word VSTO add-in on one machine where running the visual studio project opens word but does not attempt to start the add in as far as I can tell. I got to this point because I accidentally clicked Remove for the Add-in on the Manage COM Add-ins page, instead of re-enabling it after a failure. I want to know how to re-enable a deleted add-in - I'm thinking that perhaps there is a registry key somewhere I need to get rid of. When I run the project from Visual