This content has been marked as final. Show 5 replies
I'm just mentioning this because of the way you included your sample, I'm not trying to sound like an arse, but you're not running the code with the double-quotes around the whole thing as you have it typed above, are you?
The documentation does say that the extractPages function is allowed to run in a console event so you shouldn't need to run it as folder-level.
Bernd's suggestion is a good one, try that too.
What bothers me is that your error message is saying "Exec" is undefined, but I don't see the text "Exec" anywhere in your code. Where is this coming from?
You should also read the section about what "this" actually means, it
means different things in different cases.
Thanks PDL for not calling me names! No, I didn't include the quotes when I was trying to run the code. In response to your question "where is this coming from?" I think I have an answer:
After reading the guides for about 45 more minutes I came to the understanding that if I wanted the code to run, I had to SELECT ALL of it and THEN hit Ctrl+Enter ... who knew :-)
It works now, great - thanks for your time.
Aandi - I read up on "this" and I think I'm using it OK, I'll def be back when I have problems though!
My concern about the use of "this" is that it means something
different according to context. For instance in an object method, it
is the object to which the method belongs, while in a document level
script or field-level script it is the doc object for the current
Your code clearly assumes that "this" is a doc object. But to be the
case, you must be running in a document level script or field-level
script. But you are running in the console. The console is an
environment on which the manual is silent, so I don't think it is EVER
safe to use "this" in a script typed in the console EVEN IF it may
sometimes seem to work.