Created
August 27, 2020 22:23
-
-
Save iaindooley/8bb2658201b23f43ac58efa143fe7c18 to your computer and use it in GitHub Desktop.
Add image to word doc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function addImageToWordDocument(notification) | |
{ | |
var moved = new Notification(notification).movedCard("Choose Image"); | |
var current = moved.board().currentDocument().attachments().first().link();//link to a Google Doc | |
addImageToGoogleDoc(moved,current) | |
} | |
function addImageToGoogleDoc(from_card,doclink) | |
{ | |
var doc = Trellinator.getFileByURL(doclink); | |
//not sure of this exact syntax, but something like this | |
doc.getBody().appendImage(Trellinator.downloadFileToGoogleDrive(from_card.attachments().first().link()).getBlob()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment