Acrobat problem seems to begin with Sierra

I have read other posts before posting here, and I find what seems to me the same syntax. But my script which ran up through Yosemite appears to have crashed in Sierra. I am down to the very simple snippet below:

¢ “myBinder.pdf” is saved and open in Acrobat
¢ The error on either open or close is that “variable binderDoc is not defined”.

What is wrong here? Thanks for help!


tell application "Adobe Acrobat Pro"
	set nextDoc to document "page 2.pdf"
	set binderDoc to document "myBinder.pdf"
	--insert pages binderDoc after (k - 1) from nextDoc starting with 1 number of pages 1
	-- open binderDoc
	close binderDoc
end tell

I don’t own Acrobat Pro but the syntax used below is supposed to work.

set path2doc to choose file of type {"pdf"} # defines an alias

tell application "Adobe Acrobat Pro" # was tested with "Skim"
	open path2doc
	set binderDoc to document 1
	# work with the document
	delay 2
	close binderDoc saving yes
end tell

Yvan KOENIG running Sierra 10.12.3 in French (VALLAURIS, France) vendredi 17 mars 2017 19:55:10