Power Point Add-In: How to use sourceSlideIds inside PowerPoint.InsertSlideOptions when use insertSlidesFromBase64 method #1689
roberchi
started this conversation in
Show and tell
Replies: 1 comment
-
sorry this is not the correct repository for this discussion, it was incorrectly posted here. I'll move on office-add in soon. I apologize |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the documentation of Power Point js API (here the link to MS doc) you can insert in the current document some existing slides using the method insertSlidesFromBase64, the method has InsertSlideOptions where you can specify the Id of the slides you what to insert from the source. The problem is that there is no direct method to get the Ids of the slides you want to insert.
I find this way to work around this problem:
So to insert only few slides from the source:
get the slides Ids using the code above.
Fill a data structure like this:
and call this function
Here the outcomes on my add-in, not bad :-)
Note:
This also can be done using some PPTX parser library on npmjs.org that allow to have Slides' Id, but all of the libraries I fund do not take a buffer on load method but directly the path of the document, in my add-in the document comes from a repository not in the file system.
Beta Was this translation helpful? Give feedback.
All reactions