Word author -- get and set

Is there a way to get and set the author of a Word document under Word 11.2? The Finder will show the Title and Author of the document, so I know the author is set.

Per the "Word2004AppleScriptRef.pdf" document from Microsoft, I have tried the following:

tell application "Microsoft Word"
get document properties of document of window 1
get document property index author of document of window 1
end tell

The first statement returns the following which is in accord with the built in properties listed in the reference manual:
get every document property of document of window 1
{document property "Title" of document of window 1, document property "Subject" of document of window 1, document property "Author" of document of window 1, document property "Keywords" of document of window 1, document property "Comments" of document of window 1, document property "Template" of document of window 1, document property "Last author" of document of window 1, document property "Revision number" of document of window 1, document property "Application name" of document of window 1, document property "Last print date" of document of window 1, document property "Creation date" of document of window 1, document property "Last save time" of document of window 1, document property "Total editing time" of document of window 1, document property "Number of pages" of document of window 1, document property "Number of words" of document of window 1, document property "Number of characters" of document of window 1, document property "Security" of document of window 1, document property "Category" of document of window 1, document property "Format" of document of window 1, document property "Manager" of document of window 1, document property "Company" of document of window 1, document property "Number of bytes" of document of window 1, document property "Number of lines" of document of window 1, document property "Number of paragraphs" of document of window 1, document property "Number of slides" of document of window 1, document property "Number of notes" of document of window 1, document property "Number of hidden Slides" of document of window 1, document property "Number of multimedia clips" of document of window 1, document property "Hyperlink base" of document of window 1, document property "Number of characters (with spaces)" of document of window 1}

The second line returns:
get author
missing value
get index missing value
{}
get document property {} of document of window 1
current application


Thank you for any assistance.
Matt


Mac Mini; B&W G3/300 Mac OS X (10.4.4)

Posted on Jan 12, 2006 9:38 AM

Reply
2 replies

Jan 12, 2006 4:10 PM in response to HD

Thank you HD. For some reason I must have been having a brain freeze. I think I got confused by the term "document property". It is a class rather than a property. Getting and setting the value works very well. It also makes the page following the initial description of document property make sense. As document property is a class, it also has properties --

tell application "Microsoft Word"
get name of document property "author" of front document
--"Author"

get document property type of document property "author" of front document
--string
end tell

Thanks again.
Matt

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Word author -- get and set

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.