Open mscc-sascha opened 1 year ago
Hi @mscc-sascha ,
Can you please share your repro code by the public gist?
Thanks.
Hi @ZYUN-MSFT You can simply use the sample 'Get, set, load, and save slides' from the ScriptLab. I have uploaded the sample: "https://gist.github.com/mscc-sascha/91c194da4e9c83eb69dde6e234f9f188
Steps to reproduce:
An error will be thrown:
[ERROR]: Error:
{
"stack": "RichApi.Error: GeneralException\n at new n (https://appsforoffice.microsoft.com/lib/1/hosted/powerpoint-win32-16.01.js:26:244272)\n at i.processRequestExecutorResponseMessage (https://appsforoffice.microsoft.com/lib/1/hosted/powerpoint-win32-16.01.js:26:308888)\n at https://appsforoffice.microsoft.com/lib/1/hosted/powerpoint-win32-16.01.js:26:306950",
"message": "GeneralException",
"name": "RichApi.Error",
"code": "GeneralException",
"traceMessages": [],
"innerError": null,
"debugInfo": {
"code": "GeneralException",
"message": "GeneralException",
"errorLocation": "Presentation.setSelectedSlides",
"statement": "root.setSelectedSlides(...);",
"surroundingStatements": [
"var root = context.root;",
"// >>>>>",
"root.setSelectedSlides(...);",
"// <<<<<"
],
"fullStatements": [
"Please enable config.extendedErrorLogging to see full statements."
]
},
"httpStatusCode": 500
}
This error only occours in PowerPoint for Desktop, in PPT Online everything works as expected!
Thanks!
Hi @mscc-sascha ,
We are still investigating this issue with engineer team. I will back to this thread once I get update.
Thanks.
Hi @mscc-sascha ,
We have created an internal bug 8196867 for this issue. Once we got fixed we will update this thread.
Thanks.
When developing an Office AddIn for PowerPoint (using OfficeJS) I cannot use any PowerPoint API when the notes section is selected. In my scenario I want to select a certain slide by using
context.presentation.setSelectedSlides([slide.id]);
, the execution crashes with the following error message:In PowerPoint Online (web version) everything works as expected, the error is only thrown when using the desktop version (for Mac and Windows)
Provide required information needed to triage your issue
Your Environment
Expected behavior
Selecting a slide by providing the slide-id should select the slide instead of throwing an error message when the notes section is selected.
Current behavior
Error is thrown:
Steps to reproduce
context.presentation.setSelectedSlides([slide.id]);
)Context
Currently the error crashes our integration into PowerPoint when the user has not actively selected any slide content.