Hi all,
I tried opening some scripts I made a few years ago, but it seems a lot has changed under more recent Mac OSX versions?
For example, this part is not working anymore - Applescript returns something like “expected Rule End, but found Class Name” (translated from dutch…), while marking the word “document” in the second line…
tell application "Microsoft Word"
activate
set bestekDoc to active document
-- einde van document definiëren
set documentEnd to end key selection move unit a story extend by moving
-- nieuwe TOC toevoegen aan einde van document
make new table of contents at active document with properties {include page numbers:false, text object:documentEnd, use fields:false, use heading styles:true, lower heading level:3, upper heading level:1}
-- | vervangen door tabs
set tocRange to create range active document start (start of content of text object of table of contents 2 of active document) end (end of content of text object of table of contents 2 of active document) --TOC als tekst-range instellen
execute find find object of tocRange find text "| " replace with "^t" replace replace all
execute find find object of tocRange find text "^w|" replace with "^t^t^t^t^t^t^t" replace replace all -- zorgt ervoor dat er genoeg lege cellen zijn tussen omschrijving en meetcode
execute find find object of tocRange find text "|" replace with "^t" replace replace all
select tocRange
copy object selection
set the clipboard to (the clipboard as Unicode text)
end tell
Did I miss out on some “massive” change?
Thanks for any help!
Model: MacBook Pro Retina
AppleScript: Unclear…
Browser: Safari 537.85.10
Operating System: Mac OS X (10.8)