Office Add-ins documentation
23 TopicsAbility to Assign Custom Properties or Unique IDs to Individual Cells
Summary I'd like to request support for assigning custom metadata — such as unique IDs or arbitrary key-value pairs — directly to individual cells in Excel using the Office.js API. Why This Matters Currently, developers must rely on workarounds like named ranges, hidden metadata sheets, or cell notes to simulate per-cell identifiers. These approaches are either limited, fragile, or not scalable for large applications. Native support for cell-level metadata would unlock powerful use cases: Dynamic form builders Cell-level validation engines Workflow tracking Data lineage and audit trails Integration with external systems via stable cell references Proposed API Concept range.customProperties.add("id", "cell_001"); const id = range.customProperties.getItem("id").value; Or even: range.metadata = { id: "cell_001", status: "approved", validator: "admin" }; Benefits Eliminates reliance on fragile naming conventions Enables scalable, structured metadata management Improves developer experience and app robustness Alternatives Considered Named ranges: limited and global scope Notes/comments: visible to users, not structured Hidden metadata sheets: hard to maintain Custom XML parts: complex and not cell-specific Request Please consider adding support for cell-level metadata or custom properties in a future version of Office.js. Even a lightweight key-value store per cell would be a game-changer.596Views99likes2CommentsAdd viewportChanged event to Word JavaScript API
In Word add-ins, we often need to react to changes in the user's viewport (scrolling, zooming, etc.). Currently, there's no event to detect when the visible pages change. A viewportChanged event on Word.Pane or Word.Window would allow developers to optimize performance and create dynamic experiences based on what the user is viewing.215Views72likes0CommentsTable type and methods for PowerPoint (Office JS) Add-In
Currently, tables inside a slide are considered as an `Unsupported` type and cannot get any textFrame (or other properties/methods) from the table rows (as far as I read and tried). I think tables are frequently used in slides, and so providing an API for interacting with a them will come in handy. Especially for an add-in to help out with grammar/spelling, by not being able to interact with a table, it leaves a big hole. Please let me know if I should add additional information.493Views7likes0CommentsOutlook 365 for Mobile app - Compose window support for Office JS add-ins
We are exploring the new Office JS add-ons model for Outlook for mobile apps and wanted to integrate our product with iOS/Android apps. While exploring the new Office JS model, we didn't see any way to integrate the product with compose window. Task-pane or commandBar way of integration is missing for compose window. Compose window task-pane or commandBar integration is common use case among iOS/Android users. While composing emails, the following use cases are common in industry: Users want to insert documents or attach emails from 3rd part repository or storage or from content management software. When user sends an email, they want to keep a copy of the email in the repository also Currently these use cases are not possible with add-in model. But it is supported in desktop version as well as web version of add-ins. Without these use cases support, users wont adapt our solutions. So this is required for more user adaptability.Implement Document.Protect and Document.Unprotect in Word JavaScript API
I'm developing an add-in using the Word JavaScript API, and I need the ability to work with protected Word documents programmatically. In VBA and VSTO, I was able to unprotect these documents, alter them, and then protect them again. Please implement the https://learn.microsoft.com/en-us/office/vba/api/Word.document.protect and https://learn.microsoft.com/en-us/office/vba/api/Word.Document.Unprotect methods in Word's JavaScript API so that I don't have to do this through VBA or VSTO. It looks like this was already done in Excel (see https://learn.microsoft.com/en-us/javascript/api/office-scripts/excelscript/excelscript.worksheetprotection?view=office-scripts).Grouping shapes using the PowerPoint API
Hi, we are doing a project where we create a lot of shapes on a slide using the PowerPoint API, and would need to group these so the created object could be seen as one. This would make it easier to move around for the user. Is there any plan on supporting grouping from the API? Also, is there any good place to see what's coming in the PowerPoint API? Currently the PowerPoint preview API is empty and has been for a very long time.Tags can't be exported / imported for slides using .exportBase64().
As can be seen in https://github.com/OfficeDev/office-js/issues/5989 https://github.com/OfficeDev/office-js/issues/6104 Tags on Powerpoint Slides/Shapes/Presentation currently are not exported or imported when running exportBase64 on a slide, essentially killing a very large part of the functionality that they would otherwise enable. It would be great if this could be added soon 🙏.Smart alerts: Add handling for Send anyway and don't send buttons
Many add-ins have migrated to using the new smart alerts feature, primarily because it offers a non-blocking experience for users when an add-in encounters an issue. However, this migration has introduced a significant limitation: Smart alerts do not provide the same level of control that traditional dialog-based flows did, especially in scenarios where the add-in needs to know whether an email was sent or not. In the previous model, add-ins could handle "Send" or "Don't Send" actions explicitly, but smart alerts currently offer no event hooks for these actions. This poses a challenge for add-ins that depend on tracking whether a message was actually sent, as there is no reliable way to determine the outcome of the user’s decision. Suggested improvements (Implement one of these): 1. Add event handling for “Send Anyway” and “Don’t Send” buttons Introduce the ability for add-ins to register a callback function that is triggered after a user clicks either the Send Anyway or Don’t Send button. This callback should not allow UI interaction (e.g. showing dialogs or alerts) but should give the add-in a chance to log or process the outcome silently. 2. Allow send mode override from prompt user to soft block Allow the add-ins to switch the send mode from prompt user to soft block (Currently only the opposite is possible). In this model: If the add-in is unreachable, the user is not blocked and can proceed. If the add-in is reachable, it can control the send operation (leveraging the existing taskpane-based send flow).104Views4likes0CommentsFeature Request: Add error/rejection support to Office.onReady() for network/dependency failures
Description Currently, when Office.js loads but one of its dependent resources (such as office_strings.js) fails to load due to network issues or blocking, the Office.onReady() promise never resolves or rejects. This leaves developers without a reliable way to detect missing dependencies. Instead of relying on timeouts or log messages, it would be very helpful if Office.onReady() provided an error callback or rejection in these scenarios. Why this matters: Helps developers handle production failures gracefully. Avoids arbitrary timeouts/workarounds to detect missing dependencies. Provides parity with modern async practices where promises resolve or reject deterministically. Enables better telemetry/analytics by explicitly knowing why initialization failed. Suggested Approach: If a required dependency fails to load, Office.onReady() should reject with an error describing the missing dependency. Alternatively, provide an event/callback (e.g., Office.onError) that developers can subscribe to. Example: Office.onReady() .then(info => { console.log("Office.js initialized:", info); }) .catch(err => { console.error("Office.js failed to initialize:", err); // custom fallback handling }); Impact: This would improve developer experience significantly and make add-ins more resilient in real-world network environments.Support for Inserting Media Elements via PowerPoint.ShapeCollection.addMediaElement API
We are developing a PowerPoint Office.js add-in and would like to request enhanced API support for working with media files (such as audio and video) in presentations. Currently, the PowerPoint JavaScript API allows us to insert text boxes via the following method: addTextBox(text, options): PowerPoint.Shape This is extremely helpful for managing text-based content, but there is no equivalent method for adding media files programmatically. Proposed Enhancement We suggest extending the PowerPoint.ShapeCollection class with a new method: addMediaElement(mediaUrl, options?): PowerPoint.Shape Parameters: mediaUrl (string): The publicly accessible or base64-encoded URL to the media file. options (object, optional): Additional options such as: mediaType: "audio" | "video" left, top, height, width: Placement and sizing of the media on the slide. autoplay: boolean loop: boolean Returns: A PowerPoint.Shape object representing the inserted media file (video/audio), allowing further manipulation (e.g., move, resize, delete). Use Case: In our add-in, we dynamically generate slide content based on user input, and part of that workflow includes inserting media. Currently, we are blocked by the lack of a native API method to insert video/audio. We believe this functionality would be extremely valuable for a wide range of educational, corporate, and accessibility-related add-ins. Thank you for considering this enhancement to the PowerPoint JavaScript API.