none
Put image in power point 2013 task pane app RRS feed

  • Question

  • I'm trying to put image in to power point 2013. Put it occurs this error 

    The enumeration isn't supported in the current host application. I'm trying to put image with this code.

    <code>
    var img = '<img src="http://t1.gstatic.com/images?q=tbn:ANd9GcR610IxX9PoKKcH202eSCci-mCdPM7WNrBoT9Se0MA-tuL7EQJTzZWBNsHq"/>';
            var options = { coercionType: Office.CoercionType.Html };
                Office.context.document.setSelectedDataAsync(
                    img,options ,
                    function (asyncResult) {
                        if (asyncResult.status == "failed") {
                            app.showNotification('Error:', asyncResult.error.message);
                        }
                    });
    </code>

    I have tried the same code on word 2013 and it works, but in power point didn't work. So my question is how to put image in power point 2013 with task pane app.

    Thanks

    Saturday, September 7, 2013 11:39 AM

Answers

  • Hi,
    According to your description, you meets an issue to insert an image to PowerPoint 2013 with the codes you provided.

    The method “Document.setSelectedDataAsync method (apps for Office)” does not support PowerPoint client. “Unfortunately, not all coercion types are available in the other apps just yet. One option is to display the image inside your app, and instruct the end user to manually copy it into their document” (from blog Inserting images with apps for Office).


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, September 10, 2013 11:10 AM
    Moderator