57

image Making Word Documents with AppleScript

Creating text and putting it into a Word document is quite easy with the enhanced AppleScript support in Word 2004:

tell application “Microsoft Word"   activate   set newDoc to make new document   create range active document start 0 end 0   set replace selection of settings to false   type text selection text “Title"   type paragraph selection   type paragraph selection   type text selection text “Body"   type paragraph selection   type paragraph selection   type text selection text “Footer"   set titlePara to text object of paragraph 1 of active document   set name of font object of titlePara to ...

Get Developing Quality Metadata now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.