I think it’s used for the same purpose.
If you get the properties of a document, it should return a laundry list that includes the following:
properties of document 1
--> background shape:background shape of document 1
So then, we can get its properties and among them:
properties of background shape of document 1
--> fill format:fill format of background shape of document 1
Continuing down that path but this time we’re looking for two properties:
properties of fill format of background shape of document 1
--> fore color:{65535, 65535, 65535} -- aka white
--> visible:true
Now we have enough to set the background colour of the document, say to a nice but legibility-defeating blue:
tell application "Microsoft Word"
set fore color of fill format of background shape of document 1 to {0, 0, 32767}
set visible of fill format of background shape of active document to true
end tell
As far as I can tell, documents default to having this visibility set to true so that line may be redundant but I include it here to help with troubleshooting. The background shape also has a visible property so conceivably, either or both may require setting.
You say you want this to run this using osascript so here is the command to change background colour:
% osascript -e "tell application \"Microsoft Word\" to set
fore color of fill format of background shape of document
\"Document1\" to {64507, 54484, 46260}"
NB I broke it in three for readability so you’ll have to reform it into a single line. If you end up requiring the visible
property, you’ll have to add that as well.
Updated: to fix visible command