Office js Addin for Powerpoint RRS feed

  • Question

  • Hi I try to build a simple PPT Addin. My task is applying a new Color to an existing shape.
    I tried various things but it looks like Office.CoercionType.XmlSvg can never be read.
    Only thing a achieved is adding a svg at a random position.
    I cannot not even read the svg I created myself. Is the API really so limited?
    This is what I tried:
    const svgImage = '<svg><rect x="0" y="0" height="150" width="150" style="stroke:#ff0000; fill:#00ffff" /></svg>';
      Office.context.document.getSelectedDataAsync(Office.CoercionType.XmlSvg,{}, function(result) {
    Office.context.document.setSelectedDataAsync(svgImage, { coercionType: Office.CoercionType.XmlSvg, imageLeft: 220, imageTop: 220, imageWidth: 100 }, function(result) {
    Wednesday, September 30, 2020 7:46 AM