I am not sure how to tell InDesign CC to only apply its find text preference to only search upon the active document. For example, in my code below it is searching for matching text strings in all open documents. Does anybody know how to isolate the find to just the active document, front document, or document 1?
Thanks,
-Jeff
tell application "Adobe InDesign CC 2017"
activate
set theWord to "Hello World"
tell application "Adobe InDesign CC 2017"
set find what of find text preferences to theWord
set include locked layers for find of find change text options to true
end tell
tell document 1
set searchWordText to find text theWord
set searchWordTextCount to count of searchWordText
end tell
end tell