Standard Doc Properties in Word and PowerPoint 2011
Standard Doc Properties in Word and PowerPoint 2011
- Subject: Standard Doc Properties in Word and PowerPoint 2011
- From: Dave <email@hidden>
- Date: Tue, 03 Nov 2015 15:22:05 +0000
I’ve got a similar problem with normal document properties, this works in Word:
tell application id "com.microsoft.Word”
activate
set myDocument to the document of the front window
set myCount to number of document property of myDocument
repeat with myIndex from 1 to myCount
set myName to the name of document property myIndex of myDocument
if myName = "keywords" then
set myValue to the value of document property myIndex of myDocument
if myValue = "FRED" then
set the value of document property myIndex of myDocument to "HARRY"
else
set the value of document property myIndex of myDocument to "FRED"
end if
end if
end repeat
end tell
-----------------------------------------------------------------------------------
This doesn’t work in PowerPoint:
tell application id "com.microsoft.PowerPoint"
activate
set myDocument to presentation 1
set myCount to the number of document property of myDocument
repeat with myIndex from 1 to myCount
set myName to the name of document property myIndex of myDocument
if myName = "keywords" then
set myValue to the value of document property myIndex of myDocument
if myValue = "FRED" then
set the value of document property myIndex of myDocument to "HARRY"
else
set the value of document property myIndex of myDocument to "FRED"
end if
end if
end repeat
end tell
On PowerPoint I get 0 returned by:
set myCount to the number of document property of myDocument
Any ideas how to make this work?
Thanks a lot
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden