I have a plain AppleScript that finds and replaces text. But my script replaces it in all the pages. I just want to search and replace on certain pages. For example, I have a 10 page document. I just want to replace the text "John" to "Steve" on pages 3 - 5.
My current AppleScript is as follows:
tell application "Adobe InDesign CS3"
set find text preferences to nothing
set change text preferences to nothing
--Search the document for the string "John".
set find what of find text preferences to "John"
--Replace the search with Steve
set change to of change text preferences to "Steve"
-- this is the actual search and replace command
set myFoundItems to change text
What command do I need to make the search and replace only from page 3 to 5?
Thanks in advance.