Script for Word 2008 to set the font for whole document.

I just moved to Office 2008 form 2004 and am shocked to see my Macros do not work! So need to solve it with Aplescript. I spend an hour to find a way of changing the font in a whole document, to no avail.

to select all the text is easy:


tell application "System Events"
	tell application "Microsoft Word" to activate
	tell process "Microsoft Word" to keystroke "a" using command down
end tell

But how to get it to do the font?

Any tips?

Hi,

MS Word has a hugh AppleScript dictionary, forget GUI scripting


tell application "Microsoft Word" to set name of font object of text object of active document to "Helvetica"

To change specified parts of the document use find and replace

brilliant, thanks a million, and a much more clever way compared to my approach.