1,134 questions with Microsoft 365 and Office | Development | Office JavaScript API tags

Sort by: Updated
2 answers One of the answers was accepted by the question author.

Multiselection in Outlook web add-in in Outlook Web/New Outlook with Unified manifest

Hello, We migrated our solution from a COM add-in to an Outlook Web Add-in (Office.js). As part of this transition, we also encouraged our clients to move to the new Outlook. Our add-in uses the Unified Manifest model. We are now trying to implement…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-06T14:07:20.0433333+00:00
Andjela Mijailovic 0 Reputation points
edited a comment 2026-03-06T15:32:24.9366667+00:00
Gabriel-N 14,595 Reputation points Microsoft External Staff Moderator
2 answers

Popup Login flow not working since microsoft blocked windows opener unexpectedly

We are facing issues with https://login.windows.net/common/OAuth2/authorize?resource=https://manage.office.com since the resource is giving response header as cross-origin-opener-policy : same-origin; report-to="coop-endpoint"due to which…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-27T09:00:10.9633333+00:00
Collection Team 5 Reputation points
edited a comment 2026-03-06T06:27:37.8133333+00:00
Teddie-D 12,580 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

Howto bypass the "Import-only" restriction for Application permissions, or is a Service Account with Delegated permissions

I’m building a backend service to automate status updates in a Teams channel, but I’m hitting a consistent 403 Forbidden error when trying to POST a chatMessage. My app is registered in Entra ID with ChannelMessage.Send and Group.ReadWrite.All…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-05T13:58:15.72+00:00
Gilkey Nabil 65 Reputation points
accepted 2026-03-06T05:08:49.74+00:00
Gilkey Nabil 65 Reputation points
1 answer One of the answers was accepted by the question author.

How to get selected chart element in Excel JS API

We need to read the data point when a user clicks on one of the parts of a bar chart or pie chart. Something like getSelectedChartElement() that points to the underlying cell range where the data point resides? Or a Chart event whenever a chart element…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-03-05T15:19:50.2333333+00:00
Sharon Choong 0 Reputation points
accepted 2026-03-05T17:10:56.0233333+00:00
Sharon Choong 0 Reputation points
1 answer One of the answers was accepted by the question author.

Office.extensionLifeCycle.taskpane.setWidth() doesn't work on Web Word

Hello! I'm trying to use Office.extensionLifeCycle.taskpane.setWidth() to install initial width of my addin's taskpane like this: Office.onReady(() => { tr console.log(Office.context.requirements.isSetSupported('TaskPaneApi', '1.1')); …

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-23T09:58:52.6966667+00:00
Roman Tremb 20 Reputation points
accepted 2026-03-03T19:22:49.8966667+00:00
Roman Tremb 20 Reputation points
1 answer

Outlook Classic restricts Office.js network access

Hello, I am currently working on a Outlook add-in that applies the signature at the end of the body when the user starts composing an email or replies to another email. Currently I have two javascript files, one is the taskpane.js and the other is the…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-27T14:25:16.4066667+00:00
Aron Marinescu 0 Reputation points
commented 2026-03-02T10:45:45.7+00:00
Kudos-Ng 14,350 Reputation points Microsoft External Staff Moderator
2 answers

Webextensions folder not getting included in base64 format of currently opened document.

Hi Team, We are facing issue where as part of requirement we need to convert existing document to base64 that needs to be passed as parameter to our backend API. We are storing some metadata related to our usecase using Office settings API which is…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-27T06:15:38.2333333+00:00
Rajat Bharadwaj 5 Reputation points
commented 2026-03-02T06:28:38.61+00:00
Teddie-D 12,580 Reputation points Microsoft External Staff Moderator
2 answers

Questions regarding Outlook Add-in validation with local endpoint

Hello, I’m currently working on an Outlook add-in with a manifest in JSON format that needs to access information available only on the local endpoint. Using a hosted server is not possible in this scenario. I have several technical questions regarding…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-11T10:21:03.4033333+00:00
rubiks cube 0 Reputation points
edited a comment 2026-02-26T13:10:24.16+00:00
Michelle-N 12,850 Reputation points Microsoft External Staff Moderator
2 answers

Unable to Deploy Add-in in Admin Center After Adding SSO Code

I created a Word add-in that requires SSO for necessary permissions. When I tested it in Word online, I successfully added my manifest without errors, and the functions worked correctly. However, upon uploading my manifest file to the Microsoft 365 Admin…

Microsoft 365 and Office | Development | Office JavaScript API
Microsoft 365 and Office | Development | Other
asked 2024-06-07T14:12:52.51+00:00
s w 110 Reputation points
answered 2026-02-26T09:00:48.1833333+00:00
Lathisha Shaik 0 Reputation points
1 answer One of the answers was accepted by the question author.

How can the embedded OneDrive File Picker handle lots of pre-selected source items?

We have implemented an HTML OneDrive v8 File Picker according to the docs by embedding an iFrame on the page with the end of the URL being _layouts/15/FilePicker.aspx and the configurations added as a filePicker search parameter. One of the…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-20T22:10:40.0333333+00:00
Tanner Driggers 20 Reputation points
accepted 2026-02-23T15:40:32.9233333+00:00
Tanner Driggers 20 Reputation points
2 answers

Extract base64 content without using open() method

Problem Statement : There is a document which contains customXMLMappings, content controls, custom properties etc and it is a collaborative document which means it will have changes made by multiple people. The ask is to extract the base64 of this…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-13T15:20:56.0466667+00:00
RahulK 20 Reputation points
commented 2026-02-19T05:19:25.46+00:00
Austin-H 8,180 Reputation points Microsoft External Staff Moderator
1 answer

Outlook Office Add-in dropdown renders at top-left corner instead of near command button

I am developing an Outlook Office Add-in (Web Add-in using Office.js). My add-in has two sub-features: A Settings popup A Task pane for processing email data When the user clicks the Apps button inside an email, Outlook shows the list of installed…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-11T09:09:51.03+00:00
Nguyễn Trọng Cảnh 5 Reputation points
edited a comment 2026-02-13T06:10:32.6+00:00
Jack-Bu 6,525 Reputation points Microsoft External Staff Moderator
2 answers

doc.undo() works in Desktop version of Word but fails in the Online version

Problem Statement : There is a Word document which is being modified by multiple people, not simultaenously though(basically supports co-authoring). This includes all redlines, all comments, content controls, customXMLMappings etc. The requirement is to…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-08T14:31:07.0366667+00:00
RahulK 20 Reputation points
commented 2026-02-12T07:42:20.12+00:00
Austin-H 8,180 Reputation points Microsoft External Staff Moderator
2 answers

Insert shapes in Powerpoint Web does not reflect instantly

Hello, We are trying to add textboxes into presentation Slide Masters (Powerpoint). On Web (powerpoint online), it's noticed that after inserting textboxes to Slide Masters the change is not reflected instantly in the presentation, and it might not be…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-09T12:14:40.6633333+00:00
Andreas Davros 91 Reputation points
commented 2026-02-10T08:33:28.1166667+00:00
Michelle-N 12,850 Reputation points Microsoft External Staff Moderator
2 answers One of the answers was accepted by the question author.

Office add-in manipulate powerpoint headers/footers

Our main question is how we can manipulate headers and footers for a powerpoint file using office.js or another library/tehcnology available in the office add-ins context. We currently notice that there is no supported method in office.js. Is this…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2025-11-25T10:50:39.86+00:00
Andreas Davros 91 Reputation points
accepted 2026-02-09T12:10:15.0133333+00:00
Andreas Davros 91 Reputation points
2 answers One of the answers was accepted by the question author.

compareFromBase64 does not work in Windows desktop Word and neither in Word online

Problem Statement : We have a requirement to compare the currently opened document with a second document(which has some additional changes). Current Approach : We are using the method compareFromBase64 to compare between the two documents via…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-05T14:18:33.7866667+00:00
RahulK 20 Reputation points
commented 2026-02-09T10:35:33.9866667+00:00
Michelle-N 12,850 Reputation points Microsoft External Staff Moderator
4 answers

V W X Y Z v w x y z : only these letters are not being selected correctly using Select Case function in VBA.

V W X Y Z v w x y z : only these letters are not being selected correctly using Select Case function in VBA. not working for select case, using either the "_" or the ascii code, upper or lower case. Works for every other letter and number.…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-02-02T20:10:30.31+00:00
Philipp Borer 0 Reputation points
commented 2026-02-05T12:28:25.6366667+00:00
Flora-T 11,200 Reputation points Microsoft External Staff Moderator
2 answers

Header image(s) broken in document after using Office.context.document.getFileAsync with Office.FileType.Compressed

I am trying a usecase where requirement to upload the open document via addin using REST API which accepts base64 of word document. I used Office.context.document.getFileAsync function passing input as "Office.FileType.Compressed". But the…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-30T13:58:02.9666667+00:00
Rajat Bharadwaj 5 Reputation points
commented 2026-02-05T06:43:38.27+00:00
Matthew-P 11,485 Reputation points Microsoft External Staff Moderator
1 answer

What is the relation between Office.AutoShowTaskpaneWithDocument and Office.addin.setStartupBehavior+Office.addin.showAsTaskpane

In investigating auto-open for our add-in, we found two different routes through which to ensure auto-open. They seem to be able to perform similar features through an entirely different way and API. The first one is documented here:…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-26T13:42:37.3+00:00
Mark 5 Reputation points
edited an answer 2026-01-28T01:11:26.75+00:00
TiNo-T 11,685 Reputation points Microsoft External Staff Moderator
1 answer

insertWorksheetsFromBase64 works in Excel Desktop but fails in Excel for the Web (Office.js)

Where importing worksheets using Office.js works correctly in Excel Desktop, but fails when running the same code in Excel for the Web. I’m using the following approach to insert worksheets from a Base64 file: const workbook = context.workbook; const…

Microsoft 365 and Office | Development | Office JavaScript API
asked 2026-01-24T06:15:50.1233333+00:00
Hanthorn Jeff 85 Reputation points
commented 2026-01-26T00:58:00.72+00:00
Michelle-N 12,850 Reputation points Microsoft External Staff Moderator