1,126 questions with Microsoft 365 and Office | Development | Office JavaScript API tags
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
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
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
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
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
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
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
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
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
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
How to debug performance issues in Office.js add-ins running on Office desktop vs web?
I’m developing an Office JavaScript add-in and noticing significant performance differences between Office desktop and Office on the web, especially when handling large documents or frequent event callbacks. The same add-in behaves differently across…
Microsoft 365 and Office | Development | Office JavaScript API
Update/Refresh Custom Properties/CustomXmlParts on word post replacing content using base64
Hi Team, We have a requirement to open a base64string document in same word instance, instead of opening it in a new word instance ( using createDocument(base64string).open() ). We were able to replace the content using…
Microsoft 365 and Office | Development | Office JavaScript API
How to design cross-platform Excel VBA that works on both Windows and macOS?
How can Excel VBA macros be structured to run reliably on both Windows and macOS, considering platform differences such as unsupported ActiveX controls, Windows-only API calls, different file system paths, sandboxed permissions, and macro security…
Microsoft 365 and Office | Development | Office JavaScript API
How can I reliably detect and handle document state changes in an Office.js add-in across Word and Excel?
I’m building an Office JavaScript add-in that needs to react when users modify the document (content changes, save events, or selection updates). However, event handlers behave inconsistently across Word and Excel, and some events don’t fire after…
Microsoft 365 and Office | Development | Office JavaScript API
How to handle large document updates through office-js addin.
I need to update the large documents like more than 350+ pages which has 3000+ paragraphs. I'm trying to add the soft hyphens by replacing the original word with the hyphenated word in document using wordrange.inserttext() method. (as others affect the…
Microsoft 365 and Office | Development | Office JavaScript API
Sensitivity label file update office add-in
Hello, We are trying to allow the user to update a sensitivity label of a file through an office add-in. We noticed - even if our app registration has the right permissions - as long as any user has the file open, we get an error response that the file…
Microsoft 365 and Office | Development | Office JavaScript API
Need help with java code
// MOLF - Fill ONLY (1 AR at a time). No Submit clicks. // Paste 1 Excel row (TAB-separated, NO header): // FirstName | MiddleName | LastName | Role | JobTitle | Email | PhoneType | PhoneNumber | Country (function () { // Expose globally so bookmarklet…
Microsoft 365 and Office | Development | Office JavaScript API
How to get the content of a comment that has been clicked on ?
Hello, I am currently working on a Microsoft Add-In by using the Office js API and I need to retrieve the content of comments from a word document. I have been able to find how to retrieve the content of the comment when clicking on the text attached to…
Microsoft 365 and Office | Development | Office JavaScript API
Outlook add in after email send event
Hello, I'm developing an Outlook add in, specifically targeting new Outlook. One of my requirements is to trigger a UI workflow after an email is sent that will save the email to a third party system. I've attempted to do this with the OnSend event,…
Microsoft 365 and Office | Development | Office JavaScript API
Excel Add-in: Is There a Truly Unique Workbook Instance ID (Not Copied on Save As)?
We have an Excel addin written in JavaScript and have found a limitation that we'd like to know if it's truly a limitation or is not clearly understanding the Excel API. We want to store some information in a database that we can reference via an id we…