Instantly share code, notes, and snippets.

Embed
What would you like to do?
var img_html = "<img src='https://mycompany.sharepoint.com/lists/publishingimages/icons/home.png' alt='icon image'/>";
Office.context.document.setSelectedDataAsync(img_html, {coercionType: "html"}, function (asyncResult) {
if (asyncResult.status == "failed") {
write('Error: ' + asyncResult.error.message);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment