Jayshiv
Jayshiv

Reputation: 15

Formatting getting disturb while opening file using base64(Alignment,Font Colour,FontSize etc.)

My Environment Platform : PC desktop Host: Power Point Office version number: Microsoft® PowerPoint® for Microsoft 365 MSO (Version 2404 Build 16.0.17531.20140) 64-bit Operating System: Windows 11 pro

Hi Team, Here is my code snippet which is I used to open PPT using base64.

async function loadslide(mybase64) {
     try {
         await PowerPoint.run(async (context) => {
             context.presentation.load("slides");
             await context.sync();
             const slides = context.presentation.slides;
             const slideCount = slides.getCount();
             slides.load("items");
             await context.sync();
             slides.items.map((slide) => {
                 slide.delete();
             });
             await context.sync();
             context.presentation.insertSlidesFromBase64(mybase64);
             await context.sync();
             Loader("hide", translate('Addin_J_302'), "S");

         });
     } catch (e) {
         console.log("e", e);
     }
 }

After Opening my PPT file using code its alignment getting disturb I'm attaching file here for reference

RefenceDocument

Upvotes: 0

Views: 29

Answers (0)

Related Questions