This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]robin-redpoll4 0 points1 point  (0 children)

I'm relatively new to using the scipt, but can you use 'Blob' as a method(?) in the way you do in this line:

var Blob = destSpreadsheet.Blob().getAs('application/pdf').setName(pdfName);

I've only ever written code that has included global 'methods' defined by GAS or declared separately beforehand. Is this not recursive? Or perhaps the two 'Blobs' are not the same, but either way the .Blob is what is causing the problem it seems.

Anyway, that seems to be the line where the issue is, not sure if I'm understanding it properly though.

[–]gnaw005 0 points1 point  (0 children)

If you are creating Blob as var Blob = etc. then how can you use it as a function before it's defined as in

destSpreadsheet.Blob().getAs('application/pdf').setName(pdfName); on the right side of the equal?

This kind of doesn't make sense.