Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Office-JS Exception when setting underlined font property on PowerPoint for Mac Version 16.94 (25020927) - worked in 16.93 #5404

Open
1 of 3 tasks
David-Mueller opened this issue Feb 19, 2025 · 1 comment
Assignees
Labels
Area: PowerPoint Issue related to PowerPoint add-ins Platform: macOS Status: under investigation Issue is being investigated Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs

Comments

@David-Mueller
Copy link

David-Mueller commented Feb 19, 2025

Office-JS Exception when setting underlined font property

It is not possible to set the "font.underline" property with the latest PowerPoint and office-js versions when running on the "Mac" platform.

Your Environment

  • Platform [PC desktop, Mac, iOS, Office on the web]: Mac
  • Host [Excel, Word, PowerPoint, etc.]: PowerPoint
  • Office version number: 16.94 (25020927)
  • Operating System: MacOS 15.3 (24D60)
  • Browser (if using Office on the web): native desktop app

Expected behavior

The underline style can be set.

Current behavior

Exception thrown when setting the underline property to "None":

InvalidArgument
errorLocation: "ShapeFont.underline"
statement: "font.underline = ...;"

Steps to reproduce

  1. Run this code with a non-empty text element shape selected:
    PowerPoint.run(async (context) => {
        const shapes = context.presentation.getSelectedShapes()
        shapes.load("items")
        await context.sync()

        for (const shape of shapes.items) {
            shape.load("textFrame")
            await context.sync()

            const textFrame = shape.textFrame
            textFrame.load("textRange")
            await context.sync()

            const textRange = textFrame.textRange
            textRange.load("font")
            await context.sync()

            textRange.font.underline = "None"
            await context.sync()
        }
    })

Link to live example(s)

not available publicly

Provide additional details

The issue seems to only affect Mac.

Context

We are developing an office js-based PowerPpint Addin.

Useful logs

  • Console errors
  • Screenshots
  • Test file (if only happens on a particular file)

Thank you for taking the time to report an issue. Our triage team will respond to you in less than 72 hours. Normally, response time is <10 hours Monday through Friday. We do not triage on weekends.

Image
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP label Feb 19, 2025
@zartinn
Copy link

zartinn commented Feb 19, 2025

This worked on 16.93 before! This bug was introduced with the newest PowerPoint update to 16.94.

There are at least a couple of new bugs introduced with 16.94. Here a different bug that got introduced:
#5390

@David-Mueller David-Mueller changed the title Office-JS Exception when setting underlined font property on PowerPoint for Mac Version 16.94 (25020927) Office-JS Exception when setting underlined font property on PowerPoint for Mac Version 16.94 (25020927) - worked in 16.93 Feb 19, 2025
@wamaina wamaina added Needs: attention 👋 Waiting on Microsoft to provide feedback Area: PowerPoint Issue related to PowerPoint add-ins Platform: macOS and removed Needs: triage 🔍 New issue, needs PM on rotation to triage ASAP labels Feb 19, 2025
@wamaina wamaina added the Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs label Feb 19, 2025
@EsterBergen EsterBergen added Status: under investigation Issue is being investigated and removed Needs: attention 👋 Waiting on Microsoft to provide feedback labels Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: PowerPoint Issue related to PowerPoint add-ins Platform: macOS Status: under investigation Issue is being investigated Type: product bug Bug in the Office Add-ins platform or Office JavaScript APIs
Projects
None yet
Development

No branches or pull requests

4 participants