1,057 questions with JavaScript API tags

Sort by: Updated
1 answer

How to remove debug pop up on add in load

Hello all, Currently developing a JavaScript add-in for Microsoft word and are looking to start running live tests with users. To facilitate this I wish to remove the following pop-up that appears when the add in button is pressed. (Clicking…

Microsoft 365
Microsoft 365
Formerly Office 365, is a line of subscription services offered by Microsoft which adds to and includes the Microsoft Office product line.
5,771 questions
Word
Word
A family of Microsoft word processing software products for creating web, email, and print documents.
960 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2023-03-24T09:39:49.4133333+00:00
Keith McClung 10 Reputation points
commented 2025-04-23T16:32:36.13+00:00
Martin Parkur 0 Reputation points
0 answers

Is there a way to detect that a user has closed the smart alert dialog box?

Let's say my event-based addin caused this dialog to appears after user clicks send because they haven't fulfilled certain conditions. Ref:…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-04-15T15:19:21.7+00:00
Mark 0 Reputation points
0 answers

office.js:76 Uncaught Error: Office.js has not fully loaded. Your app must call "Office.onReady()" as part of it's loading sequence (or set the "Office.initialize" function). If your app has this functionality, try reloading this page.

I'm developing a Word Add-in using the Yeoman generator and have integrated custom APIs for the authentication flow. Although I've implemented Office.onReady() in both my main platform and within the Add-in code, I’m consistently encountering the…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-04-14T11:28:41.33+00:00
diksha tiwari 0 Reputation points
0 answers

Insert Word document into Outlook email using office.js

Is it possible to insert a Word document into an Outlook email using office.js? I know how to do it using VBA/VSTO but am struggling in office.js I can see that HTML can be inserted, but I'm unsure how to convert a Word document to HTML for insertion…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-04-07T06:24:13.4533333+00:00
Matthew Fitzmaurice 0 Reputation points
1 answer

Using Microsoft 365 Defender with GCC-HIGH endpoint

Hello, We are attempting to connect to Microsoft 365 Defender using API requests. We've tried both the device code flow and the client credentials flow. Since our tenant is GCC-HIGH, we have ensured that our requests use the correct resource and scope…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-02-27T09:49:45.9433333+00:00
itay4 56 Reputation points
edited a comment 2025-03-31T14:39:54.0066667+00:00
itay4 56 Reputation points
1 answer

How to detect hyperlinks using Word office js API

I develop an office add-in for Word (React frontend, typescript). I need to retrieve all hyperlinks in a Word document using the API (https://learn.microsoft.com/en-us/javascript/api/word?view=word-js-preview). But I cannot figure out how to do that…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2021-12-06T08:50:56.327+00:00
Jens Madsen 1 Reputation point
edited a comment 2025-03-27T05:27:51.79+00:00
Muhammad Talha 0 Reputation points
1 answer

Background Color of a Slide

How can I get the background color of a slide or the presentation theme? I cannot find such an option in the documentation. For example, most presentations (including the standard one) have a white bg. But some have a different color, I want to get…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-03-01T21:53:10.83+00:00
Simon Paul 20 Reputation points
answered 2025-03-26T07:00:35.1266667+00:00
Ilgar Zarbaliyev 26 Reputation points MVP
1 answer

Unable to download Office for the first time

I have recently purchased a product key for Office 2024 Standard Edition. I start by entering my product key at setup.office.com. My product key gets me to a 2nd page with terms and conditions. I click the redeem. I am taken to a 3rd page where I can…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-03-19T14:13:31.2666667+00:00
D Baillie 0 Reputation points
answered 2025-03-26T06:56:18.3433333+00:00
Ilgar Zarbaliyev 26 Reputation points MVP
1 answer

Shapes , Text boxes in header and footer

Hi there, I've developed an office add-in to get word docs out of my backend app as base64 and on my frontend app i insert this either into newly created document or the context document. Now i'm facing a problem of getting my elements the right styles…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-03-20T10:01:57.89+00:00
Abbas, Yazan [cronos] 0 Reputation points
answered 2025-03-26T06:55:02.9233333+00:00
Ilgar Zarbaliyev 26 Reputation points MVP
0 answers

Office.js Not Fully Loaded Despite Calling Office.onReady()

When developing a Word add-in, the following error message is encountered: "Office.js has not fully loaded. Your app must call 'Office.onReady()' as part of its loading sequence (or set the 'Office.initialize' function). If your app has this…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-03-18T22:15:53.7533333+00:00
Jesse Shalev 0 Reputation points
0 answers

Cross-domain messaging not working as expected in Office dialog API

We are using OfficeDialogAPI to open dialog boxes in our Office Add-in. While closing the Dialog Box, we need to send some data to the parent host and we are using Office.context.ui.messageParent & Office.EventType.DialogMessageReceived to handle…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-03-18T09:44:56.7266667+00:00
Ravi Varma Bathula 0 Reputation points
1 answer

How to Retrieve Local and Web Paths of an Excel Workbook from OneDrive using JavaScript API

A OneDrive folder has been synchronized on a local machine, allowing workbooks to be opened directly from this folder. The local and web paths can be obtained using the Info => Copy path and Info => Copy local path options, as highlighted in the…

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
2,176 questions
OneDrive
OneDrive
A Microsoft file hosting and synchronization service.
1,321 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,344 questions
asked 2025-02-18T16:52:25.0666667+00:00
Kashif Bashir Bhatti 36 Reputation points
answered 2025-03-18T08:52:54.53+00:00
Adrian Wu 0 Reputation points Microsoft Employee
0 answers

User prompts within Office scripts

Is functionality within Office Scripts to create user prompts coming?

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-03-14T00:47:15.63+00:00
Mike Healey 0 Reputation points
5 answers

Cricut design space Feb 2023 update issue

I update my design space on 2/10/23 and since then I am no longer able to use design space. I get a blank white screen that acts as though it is constantly trying to reload. I then get a JavaScript error after closing the blank design space. Once I click…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2023-02-16T17:11:55.85+00:00
Felicia Kelly 35 Reputation points
answered 2025-03-13T12:21:51.2433333+00:00
Richard Parker 0 Reputation points
1 answer One of the answers was accepted by the question author.

Retrieving text from a table in PowerPoint

How can I retrieve text from a table in with the JS API in PowerPoint? The usual ways fails, as it is not a real text field. Thank you for your answer!

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-03-03T12:03:34.7766667+00:00
Simon Paul 20 Reputation points
accepted 2025-03-13T05:00:27.1366667+00:00
Simon Paul 20 Reputation points
1 answer

How can I invoke copilot.microsoft.com programmatically via an API so that i can send a prompt in via code or a link?

I would like to submit prompts to copilot.microsoft.com programmatically via API or link such that the user is not forced into the copilot interface to enter a prompt. The problem is to be able to have the user make a preselection from a menu and have…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
Microsoft Copilot
Microsoft Copilot
Microsoft terminology for a universal copilot interface.
791 questions
asked 2024-03-20T20:39:42.6366667+00:00
ChrisCottrell-8918 100 Reputation points
answered 2025-03-12T16:54:47.0766667+00:00
Ben Hoffmann 0 Reputation points
0 answers

How to implement paste with destination formatting using Office JS API

Hi, I am trying to implement a cross application AddIns functionality where user can select some Excel data and paste in Word. I want to preserve all the source formatting as how the Word allows to do using Paste with keep source formatting option. …

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-03-11T07:12:05.8066667+00:00
Rahul Kumar 0 Reputation points
0 answers

Office Scripts : Chart Data Labels "Values From Cells

I am trying to create an Automate Script in Excel that will generate and format chart. I am getting close, but I can't figure out how to set Data Label values. I want the same functionality as the Format Data Label/Label Options/Vale From Cells as…

Excel
Excel
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
2,176 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,344 questions
asked 2024-09-30T20:07:14.6433333+00:00
Tim Smith 0 Reputation points
commented 2025-03-10T17:54:42.54+00:00
Al Shahriar 0 Reputation points
2 answers One of the answers was accepted by the question author.

Availability of OnMessageReadWithCustomHeader for Web and New Outlook on Windows

Hello, I would like to know when the OnMessageReadWithCustomHeader events will be available for Outlook on the web and the new Outlook for Windows. This feature is essential for our workflow, and we would appreciate any insights on its expected rollout…

Outlook
Outlook
A family of Microsoft email and calendar products.
4,504 questions
JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
4,344 questions
asked 2025-01-31T16:53:03.2333333+00:00
Max Saraev 20 Reputation points
accepted 2025-03-04T08:40:12.2266667+00:00
Max Saraev 20 Reputation points
0 answers

await context.sync not functioning properly for word JS API

I am using the following code- await Word.run(async (context) => { const selectedRange = context.document.getSelection(); selectedRange.load(); await context.sync(); // Insert Content Control const cc =…

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
1,057 questions
asked 2025-03-03T09:19:30.59+00:00
Adhirath Naruka 0 Reputation points
edited the question 2025-03-04T01:06:21.25+00:00
Emi Zhang-MSFT 30,006 Reputation points Microsoft External Staff