Coder Social home page Coder Social logo

Comments (7)

YuvrajPuyam avatar YuvrajPuyam commented on August 10, 2024 1

Hi @EsterBergen

Thanks for the update!

We've implemented this function and it's working on web version however it's giving a RichApi.Error: GeneralException error for getImageAsBase64 function on local desktop application.

We're using Microsoft 365 MSO (Version 2404 Build 16.0.17531.20152) 32-bit.

Requesting any information on why this might be happening.

from office-js.

Tjerkdb avatar Tjerkdb commented on August 10, 2024

any update on this?

from office-js.

EsterBergen avatar EsterBergen commented on August 10, 2024

Hi @Tjerkdb - Thanks for noticing we have some new APIs that will release soon. These APIs are currently making their way through the rings and will be available for use via Insiders in the upcoming weeks. I can update you here with the official builds. Thanks!

from office-js.

YuvrajPuyam avatar YuvrajPuyam commented on August 10, 2024

Hi @EsterBergen could you please let me know what is the approximate time for this functionality to be available in either preview(beta build) or official build?
Thanks

from office-js.

EsterBergen avatar EsterBergen commented on August 10, 2024

Hi @YuvrajPuyam - Thanks for following up! I confirmed today that the APIs should be available to access in the following builds. Please refer to the beta APIs as these are all in preview.
Beta library: https://appsforoffice.microsoft.com/lib/beta/hosted/office.js.

This should work on the following builds:
Windows: 16.0.17628.20006 and beyond.
Web: Current release
Mac:16.85.242.0

More info: PowerPoint.Slide class - Office Add-ins | Microsoft Learn

Let me know if you still run into issues.

from office-js.

EsterBergen avatar EsterBergen commented on August 10, 2024

@YuvrajPuyam - you'll want to update to an earlier version/insiders ring of office to have access to the API.

This should work on the following builds:
Windows: 16.0.17628.20006 and beyond.
Web: Current release
Mac:16.85.242.0

from office-js.

nermin-slidelizard avatar nermin-slidelizard commented on August 10, 2024

I was getting the RichApi exception when using the map function to iterate through slides, when changing that back to a normal foreach loop it worked perfectly.
My version is: 16.0.17628.20006

The code try this in script lab:
async function getAllSlides() {
await PowerPoint.run(async (context) => {
let finalTable = "";
context.presentation.load("slides");
await context.sync();
const allSlidesList = {};
const allSlidesCount = context.presentation.slides.getCount();
context.presentation.slides.load("items");
await context.sync();
let allSlideItems = context.presentation.slides.items;

for(const slide of allSlideItems){
  slide.load();
  
  try {
    await context.sync();
    const clientResult = slide.exportAsBase64();
    await context.sync();
    // console.log(clientResult.value); // this will most probably kill your console
    console.log("\n")
    console.log(slide.id);
  } catch (e) {
    console.log(e);
  }

from office-js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.