77 questions
0
votes
2
answers
69
views
Change the content of a powerpoint using MS add-ins
I am trying to open a presentation in MS- PowerPoint. I have created a add-In for it. It has a button which will retrieve the file on click of a button from s3 and then it will upload the file into ...
0
votes
1
answer
86
views
Office Add-In: Excel API Set 1.16 Not Available When Using Local Office.js Version
I'm developing an Excel Add-In using the latest npm version of the JavaScript API and I'm encountering an issue with the latest Excel API set (1.16) functionality.
I’m trying to access the valueAsJson ...
1
vote
1
answer
74
views
Excel Add-in API functionality for storage, identity, and notes
I was directed to ask this question in this forum from here.
We are developing an Excel Add-in in Javascript and want to understand the API better.
Our application needs to store data in a way ...
0
votes
1
answer
52
views
Reopen file using office JS
Is it possible to reopen the already open file by discarding unsaved changes using office JS. According to the office API we don't have any open method. https://learn.microsoft.com/en-us/office/dev/...
0
votes
1
answer
217
views
Excel AddIn Custom Function - Unable to Dynamically Write Data to Multiple Cells
I'm working on an Excel add-in using Office JavaScript API, and I'm facing an issue with writing data to multiple cells using a custom function that I add dynamically during runtime. It seems that the ...
0
votes
1
answer
140
views
How to get the layout count present in slide master with office js
I want to access layout count which are present in slide master.
const slideMaster = context.presentation.slideMasters.getItem(0).layouts;
1
vote
3
answers
618
views
OfficeJS Extracting all shape from every slide of a PowerPoint document
We want to extract all shape of an opened PowerPoint document from an add-in.
We haven't found much documentation on how to use the API for PowerPoint specifically (this is all we found). We did able ...
1
vote
1
answer
120
views
How to get advanced function environment function in excel using officejs
I am new to the Advanced Formula Environment. I have created the one testing function using Advanced Formula Environment. I want to get that formula name using office JS. I have tried the following ...
1
vote
2
answers
614
views
How to convert byte array response returned from backend to word document using Office.js?
I am using compareDocuments function to compare two documents and returning compared document as a byte array as response to front end , I don't know how to convert this byte array and open it as word ...
0
votes
0
answers
48
views
Caching web requests in Excel UDF (javascript API)
The excel javascript API can request data from an external service as outlined here: https://learn.microsoft.com/en-us/office/dev/add-ins/excel/custom-functions-web-reqs
However, imagine a UDF that ...
2
votes
0
answers
706
views
Get cell color via Excel Javascript API
In Ms articles they describe how to set the Excel cell color via JavaScript API.
await Excel.run(async (context) => {
let sheet = context.workbook.worksheets.getActiveWorksheet();
let ...
1
vote
1
answer
355
views
Can you auto-run a custom functions add-in, or dynamically run it from a different add-in (same domain)?
TL;DR - By default, a custom functions add-in registered with Excel is available, but not running, when Excel loads. It only gets run if one of its custom functions is used (or if it has a task pane ...
0
votes
1
answer
157
views
How to show message from custom function w/o using task pane or return value?
Is it possible to show a message (just a warning the user can dismiss) from code in a custom function without using a task pane? (And without making it the return value of the function.) Something ...
0
votes
2
answers
406
views
Issue with getOoxml() and insertOoxml() for a ContentControl with in a Table
I have multiple contentConrols in a table and trying to implement hide/display feature.
While hide - taking getOoxml() of the ContentControl inside the table and deleting it.
While Display - ...
1
vote
0
answers
171
views
Processing large documents using Word Javascript API / Office.js
For large Word documents its impossible to get all the text at once. For 100+ pager, doing so crashes the extension.
Is there a recommended or canonical approach to break down the document? One ...
-1
votes
1
answer
163
views
Accessing Word API from an Excel add-in or vice-versa
In VBA, It's posssible to reference an open instance of word (using GetObject(Class:="Word.Application") in order to manipulate documents (.Documents) using the word object reference, even ...
1
vote
1
answer
79
views
js excel addin charts.add method issue
some time ago(unfortunately I can not say how long exactly) I start to get an issue with the charts function - here is an example from script lab which exactly reproduces what I have in my project: ...
2
votes
2
answers
778
views
How can I display console.log?
this topic is related to persons who developing excel add-ins using javascript api.
https://learn.microsoft.com/en-us/office/dev/add-ins/excel/excel-add-ins-ranges#get-the-selected-range
How can I ...
1
vote
2
answers
994
views
How do I actually add Filesystem Access API to javascript?
I've found this https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API to allow javascript to access the local file system. I feel really dumb, but I can't find anywhere that talks ...
0
votes
1
answer
565
views
How to dynamically load Word API (office.js) version based on current office version
I am developing word office add-in.I need to load word javascript API based on microsoft version available.
example:-If office version is 2016 i need to load Word API version 1.1
If it is 2019 i need ...
0
votes
1
answer
270
views
How to find whether strikeThrough /underline is present in word document using office.js
I am working on Word web-in using office.js.
I have a requirement like when I load the document on word if user makes any strikeThrough or Underline in the document.Need to retrieve the value whether ...
1
vote
0
answers
549
views
Working with Visio Javascript API and WOPI Host
We have developed a WOPI Host that serves Word and Visio files to the Wopi Client (Which is Office for the web). We have been trying hard to see if we can get "shape info" of the shapes in ...
2
votes
2
answers
2k
views
can I set cell number format programmatically?
I have an excel js add-in with custom functions, some of them should return date and here I have a problem:
I can format and display this date as a string but in this case, I can't use this date as a ...
0
votes
2
answers
863
views
Relate Outlook message inline attachment to element in HTML body
When using Office.js to retrieve the body of an email that has inline attachments, we receive HTML like this:
<div>
<div dir="ltr">
<div style="color:black;font-size:12pt;font-family:...
1
vote
1
answer
165
views
Get message body update notification while composing email for Outlook
I'm working on an Outlook AddIn I need to get the body of the message while user composing the mail. I know we can use JavaScript API for Office get body async call to fetch the body. But for long ...
5
votes
2
answers
2k
views
Is there is a way to insert macro to worksheet from Excel Addin?
I searched documentation Office Excel API, but cannot find any mentions at all, how it can be implemented.
The Problem:
Luck of API functionality or some sort of bugs can be solved easily by VBA ...
1
vote
1
answer
574
views
How to upload outlook email attachments on my cloud server using Outlook Js Add-in
I am developing outlook javascript add-in using vs2017. I have created a sample application to find attachments from outlook mail item. Here, While getting attachments from Exchange Server, It returns ...
0
votes
1
answer
670
views
Outlook AddIn GetAsync successful but returns nothing
I've got an Outlook Add In that was developed using the Office Javascript API.
It looks at the new email being composed & does things based on who it's going to: https://learn.microsoft.com/en-...
0
votes
1
answer
1k
views
How to get data of the selected range in Excel Javascript API?
I am trying to write a Excel plugin where I get the data from the currently selected ranges and then serialize it to be sent over rest request. Here is what I got:
Excel.run(function (ctx) {
var ...
0
votes
0
answers
159
views
automatically run html which includes "Tableau Javascript API code" over Phantomjs
Is it possible to run tableau-javascript-api code, which works with html, over phantomjs?
I'm working on a project to get Tableau data over tableau-javascript-API and then test them if it shows ...
3
votes
1
answer
3k
views
Office add-in: XMLHttpRequest cannot load XXX due to access control checks
I'm building an Outlook add-in with jQuery and the Office JS API. I have a local server going while developing, and I'm trying to submit a POST request to an endpoint on my site's main server. Every ...
0
votes
2
answers
103
views
SearchOptions using Sequence number of the Word - MS Office Word Addin OfficeJS
Right now I am locating the words in a Word document by searching the term using
context.document.body.search(dict, { ignorePunct: true, matchCase: true, matchWholeWord: true });`
But I want to ...
2
votes
0
answers
180
views
How to create/enable bookmarks when converting word document to PDF using office js
I used getFileAsync() method to create pdf of the word document:
Office.context.document.getFileAsync(Office.FileType.Pdf,
function(result) {
if (result.status == "succeeded") {
var ...
3
votes
0
answers
137
views
Nest tables with Office Javascript API in Word
I want to nest a table object inside other table cell using the javascript office api.
I saw that the TableCell object doesn't have the method insertTable so i cannot call it though the cell.
The ...
1
vote
1
answer
505
views
Excel Javascript API set note to cell
Is there a method to set a note to a specific cell ?
For example, I would like to add something like this:
sheet.getCell(1, 1).note = "My Note";
1
vote
0
answers
42
views
Does Silverlight support Outlook Addin(Javascript API)?
We are trying to integrate Silverlight components in Outlook task panel which is developed by Outlook Javascript API. However when mailapp(task panel) loaded, it appears error and it prompts the ...
1
vote
1
answer
1k
views
JavaScript API for Office getRange method
Is there a way to get a range by row, column, numRows, numColumns?
For example:
Excel.run(function (ctx) {
var sheet = ctx.workbook.worksheets.getActiveWorksheet();
var range = sheet....
0
votes
1
answer
539
views
How to allow insert multiple paragraph inside content control using Word javascript api
I am inserting a nested content control and want to insert multiple paragraph in inner cc. There is a outer cc that is not editable and inside it, another inner CC is available in which i want to ...
1
vote
1
answer
381
views
How to delete range that contain content controls in word using JS Api
i need to remove range from current doc that contains some contentControls with properties cannotEdit/cannotDelete = true. When i am trying to delete the range using range.delete(), word throwing ...
2
votes
1
answer
680
views
How get parent Range of current Selection in word add-in using JavaScript API
I need to insert a paragraph with ContentControl after the current selection paragraph, suppose the current selection is in middle of any paragraph, table or CC, I need to insert a new paragraph with ...
0
votes
1
answer
555
views
How to insert a ContentControl inside another ContentControl in word using Javascript Api
I need to insert a contentControl that will contain a table and wrap this ContentControl inside another parent contentControl. Currently contentControl that contain table data inserted correctly but ...
1
vote
1
answer
647
views
How to insert a table inside a contentControl using Word javascript api
I am developing a word add-in using word JavaScript api, I need to insert some data in table format inside the content Control and placed that content control on top of document.
Please advice.
...
2
votes
1
answer
606
views
Word JS api Access Denied (ContentControl.select, Body.getHtml)
I'm trying to select content control through js select() function - docs - but I'm always getting Access Denied error:
Error:
{
"name": "OfficeExtension.Error",
"code": "AccessDenied",
"...
0
votes
1
answer
2k
views
How to insert Rich Text Format(.rtf) file content into word doc using word javascript API
I am using word javaScript Api for developing a Word add-in, i need to load a file from server and insert the content into the document, currently .docx files are working fine and inserted into the ...
1
vote
2
answers
907
views
How to update javascript excel Api set to 1.4
I am developing an Office Excel Javascript addin using Microsoft Visual Studio 2015 Community Edition. I have installed Microsoft Excel 2016 for Windows. Now my addin needs to run certain methods ...
1
vote
2
answers
1k
views
How to store values(key, value) pair in a word document
I am developing a word add-in using word JavaScript API. I need to store some values in context of a document so when i open a document again on same client or other client, want to get that values ...
0
votes
0
answers
79
views
How to use localStroge in word Add-in
I am developing a add-in using word javascript Api and i need to store some information locally so want to use the Local Storage but tried to strore the values it shows me below error:
Code: ...
0
votes
1
answer
282
views
How to update same content control in different context
I am using word javascript Api for developing a word add-in, I need to insert a content control on button click and send a ajax request. In ajax response i need to update the same content control.
I ...
0
votes
1
answer
80
views
Page automatically go to the top when opening a dynamic jquery dialog box first time
I am developing a Task pane word add-in using JavaScript API, I have used below code to create a jQuery dialogbox dynamically using a function:
function myConfirm(dialogText, okFunc, cancelFunc, ...
0
votes
3
answers
913
views
How to get parentContentControls from current selection in word add-in
I am developing a word add-in using word javascript api and need to get contentControl for current selection, so used parentContentControl for current selection.
**Code:**
var range = context....