Hi @Umair Shehzad
Thank you for posting your question in the Microsoft Q&A forum.
Based on my research, it’s not currently possible to apply a POTX or PPTX theme to existing slides using Office.js. The insertSlidesFromBase64() method can be used to add new slides, but it doesn’t modify the existing ones in the deck.
You can insert full slides from another presentation using insertSlidesFromBase64(), but there’s no direct way to copy or move all content between existing slides. Office.js also doesn’t currently provide an API to read all shapes from a slide and recreate them on another.
At the moment, there’s no public information about plans to add this functionality. As a forum moderator, I can share guidance from public Microsoft resources, but I don’t have access to internal systems or the product roadmap, so I can’t confirm if or when this might become available. You can follow the Microsoft 365 Developer Blog for any future updates.
In the meantime, you might want to try these steps:
1.Insert template slides and migrate content manually
Use insertSlidesFromBase64() to insert slides from your template. Then, have users manually copy their content into the new slides or use PowerPoint’s Reuse Slides feature.
You can refer to these articles for more details:
Insert slides into a presentation
Reuse (import) slides from another presentation - Microsoft Support
2.Make the theme available in PowerPoint
Insert at least one slide from the uploaded .potx or .pptx so the theme appears in the Design > Themes gallery.
After that, users can manually apply the theme. You can also provide UI hints in your taskpane to guide them.
3.Load the theme and guide users through migration
Add a few slides from the template to bring the layouts into PowerPoint and offer a clear flow for users to move their content into the new design.
I hope this information proves helpful and appreciate your understanding.
If the answer is partially helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.