I create this script to insert a simple picture into a simple Google Document:
function myInsertImage() {
var MyImage = "https://de.wikipedia.org/wiki/L%C3%B6we#/media/File:Lion_waiting_in_Namibia.jpg";
var doc = DocumentApp.getActiveDocument();
doc.getBody().insertImage(0, MyImage);
}
I get always get this error:
"Method insertImage(number, string) not found"
When I changed insertImage to appendImage, it has the same problem.
Does anyone know where is my fault?
You can try it like this using Google Apps Script:
or
This will insert an image at the top of the document.
For more infos:
insertImage()fetch()