Office Add-ins development
370 TopicsSet the file name for newly created the Excel file - Excel.createWorkbook()
Unable to set the file name for the newly created Excel file. I don't see any info on how to set the name for the Excel.createWorkbook() function which only accepts a base64 xlsx payload. The file opens up with a name called Book 1.Outlook Calendar: display event times in user's timezone in edit view
I would like to see the event times in my timezone in Outlook Calendar all the time regardless of the timezone used when event was created. For example: Event is created with UTC timezone but my timezone is UTC+2 (this can happen when using different integrations or calendar syncs which create events for me in my calendar) Current behavior: Open Outlook Calendar - event times in UTC+2 Click on the event and a little popup is shown - event times in UTC+2 Click edit and the short form for editing is displayed - event times in UTC+2 Click on more options and the full form is displayed - event times in UTC14KViews118likes33CommentsConditionally load Add-in on document load
Right now with our PowerPoint office add-in we are loading the add-in during document open time using office.addin.setStartupBehavior(Office.StartupBehavior.load). For the users who already have the add-in, the experience is great when they open the document. But, for others who don't have the add-in they are getting an error popup "This add-in is no longer available: ..." when they open the document that is saved with the office add-in. Can you add some behavior to conditionally load the add-in in the document only if the user has it.Support for Right-Click Event Hook in Word to Dynamically Update Custom Context Menu Items
The Office JavaScript API currently provides support for adding custom items to Word’s context menu and controlling their enabled/disabled state. However, there is no event hook available to detect when a user performs a right-click within the document. This limitation prevents add-ins from dynamically evaluating the current context and updating menu item availability accordingly. As a result, users may encounter disabled options when they expect functionality, or enabled options that are irrelevant to their current selection or location in the document. In contrast, this capability is fully supported in the VSTO (Visual Studio Tools for Office) framework, allowing developers to align closely with Word’s native UX behavior. The absence of a comparable feature in Office JS presents a significant obstacle in the process of migrating existing solutions to the web-based platform. Request: We propose the introduction of a right-click (or context menu) event hook in the Office JS API for Word. This event should provide sufficient contextual information to enable add-ins to make real-time decisions about which menu items should be active. This enhancement would greatly improve the interactivity and responsiveness of modern Office add-ins, helping to bring them closer to parity with legacy solutions and ensuring a smoother user experience.105Views8likes2CommentsControl focus and scroll in Word office JS add-in's
Suggestion: Ability to Control Scrolling Behavior in Word JavaScript API Problem: Currently, using Range.select() in the Word JavaScript API automatically scrolls the document to bring the selected range into view. This behavior cannot be controlled or disabled. In many real-world scenarios, this is problematic. Our users often work with large Word documents and long ranges or selections. Any programmatic selection — for example, when updating or analyzing a range — causes Word to jump to another part of the document. This disrupts the user’s workflow and creates a frustrating experience. Proposed Improvement: Add an option to control scrolling behavior when selecting or manipulating ranges. For example: range.select({ scroll: false }); This would allow developers to programmatically select or update ranges without forcing Word to scroll to that location. Impact: Providing control over scrolling would greatly improve usability for scenarios involving background processing, automated edits, or analytical operations in large documents, where visual focus should remain undisturbedPowerPoint add-in: hide / show slides
I am trying to add a sideload add-in doing some automation in PowerPoint. I couldn't find a command or property in the PowerPoint office add-in to hide/show slides, but I desperately need this functionality! I currently have to switch to a VBA script for this. However, I can't create a product that combines JavaScript and VBA. Thanks, FlorianEnable editing of TextRuns in existing PowerPoint table cells via Office.js
When building Office add‑ins for PowerPoint, it is common to style only part of a table cell (e.g., to colour a single word). The TableCellProperties interface allows specifying multiple text runs when the table is created: the documentation states that if only part of a cell requires different formatting, developers should use the textRuns property . However, after a table has been created there is no supported way to change those text runs. Today developers can enumerate cell.textRuns and read their text and font properties, but they cannot modify them: setting run.font.color or other attributes is ignored. There is also no method to replace the existing runs. This limitation is documented in Office.js issue #6129, where the expected behaviour is to have writeable textRuns so add‑ins can update per‑run formatting; the current behaviour is that textRuns in table cells are effectively read‑only and there is no “replace cell content with these textRuns” API . Attempts to recolour a run using code such as run.font.color = "#FF0000"; have no effect . Because of this limitation, developers cannot update part of a cell’s text or change its formatting without reconstructing the entire table via specificCellProperties, which is inefficient. Please add an API to modify existing text runs or assign a new array of TextRun objects to a table cell (for example, a method like cell.setTextRuns(newTextRuns) or by making TextRun.font properties writeable). This would align table behaviour with the ability to edit a PowerPoint.TextRange on a slide and would enable dynamic updates to partial text formatting. For completeness, the related GitHub issue #6130 notes that properties such as cell.fill.color and cell.borders.*.color are currently unavailable, which makes it difficult to reconstruct a table while preserving its colours. Addressing both text run editing and proper exposure of cell formatting would greatly improve the PowerPoint add‑ins API.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 🙏.