Hi all.
Long time you see: sorry for this, but as in past, I need your help.
I have many documents .docx builder by Word for Mac 2011 in a Mac with 10.6.6
In any document there are lot of sequences like “Figura X.X” that have to become
“Figura X.1”, “Figura X.2”, “Figura X.3” …
I have build this little script for this (helped by Google)
tell application "Microsoft Word"
set findRange to find object of selection
set numero to 0
repeat
set cap to 2
set numero to (numero + 1)
set figura to "Figura " & cap & "." & numero
tell findRange
execute find find text "Figura X.X" replace with figura replace replace one
end tell
-- if (execute find) is "false" then exit repeat
end repeat
end tell
I have found and edit this script that find all “Figura X.X” and changed in sequence to “Figura 2.1”, “Figura 2.2”, “Figura 2.3” …
First problem is that the script change ONLY the first sequence, not all. If i change replace one with replace all, all sequence become “Figura 2.1”, tant’s not right.
Second problem is that I’m unable to block the script. How can I bring the answer false of the tell routine and put in a variable?
Tnx for all
Model: iMac
AppleScript: 2.3
Browser: Safari 533.19.4
Operating System: Mac OS X (10.6)