OfficeDev / office-js

A repo and NPM package for Office.js, corresponding to a copy of what gets published to the official "evergreen" Office.js CDN, at https://appsforoffice.microsoft.com/lib/1/hosted/office.js.
https://learn.microsoft.com/javascript/api/overview
Other
687 stars 94 forks source link

The AddTextBox function is not displayed when used with PPT #4177

Open ChienHo opened 8 months ago

ChienHo commented 8 months ago

Provide required information needed to triage your issue

Your Environment

Expected behavior

The text added to Ppt must show when AddTextBox function done.

Current behavior

The text added to Ppt dose not show when AddTextBox function called, make a change to this slide (e.g., moving/resizing a car) then undo the change afterwards text will display.

Steps to reproduce

  1. Using AddTextBox function from js office api
  2. Make a change to this slide (e.g., moving/resizing a car) then undo the change change afterwards text will display.

Link to live example(s)

  1. [Script Lab] https://gist.github.com/ChienHo/528a1201202a658f9817d8161f7bc907

  2. Video demo screencast-bpconcjcammlapcogcnnelfmaeghhagj-2024 02 26-15_58_47-ezgif com-video-to-gif-converter


Provide additional details




Context

Useful logs

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.

lindalu-MSFT commented 8 months ago

@ChienHo Try shapes.AddTextBox. Office-js uses JavaScript which is case sensitive. Let me know if that works. For more info, see https://learn.microsoft.com/en-us/office/vba/api/powerpoint.shapes.addtextbox

EsterBergen commented 8 months ago

Hi @ChienHo - this is a known issue about TextBox in PPT Online. If you move the text box, you should be able to see the text within. We have a bug (8545477) tracking this issue and we can provide updates once they are available.