I want to rename the bookmarks in my Indesign documents. The scripts works fine for the first level bookmarks, he skips the sub bookmarks.
Does anyone can help me to add the other bookmarks as well?
tell application "Adobe InDesign CS5"
tell active document
set allBookmarks to every bookmark
repeat with x from 1 to count of allBookmarks
log name of item x of allBookmarks as list
set name of item x of allBookmarks to my getTextInExcel(x)
end repeat
end tell
end tell
on getTextInExcel(x)
tell application "Microsoft Excel"
tell active workbook
tell active sheet
set thisVal to formula of cell ("A" & x)
log thisVal
end tell
end tell
end tell
return thisVal
end getTextInExcel