Re: Standard Doc Properties in Word and PowerPoint 2011
Re: Standard Doc Properties in Word and PowerPoint 2011
- Subject: Re: Standard Doc Properties in Word and PowerPoint 2011
- From: Dave <email@hidden>
- Date: Wed, 04 Nov 2015 09:45:32 +0000
Hi Again,
Thanks a lot for this, it works really well:
> tell application id "com.microsoft.Powerpoint"
> tell active window
> tell its presentation
> if value of document property "keywords" = "HARRY" then
> set value of document property "keywords" to "FRED"
> else
> set value of document property "keywords" to "HARRY"
> end if
> end tell
> end tell
> end tell
>
> ----------------------------------------------------------
>
> Figuring out PP's different syntax was a bit pesky, and without Script Debugger it would have been worse.
————————
I tried to adapt your example to do the same to a custom document property, but the above fails on:
if value of custom document property “LTWProp" = “NO” then
error "Microsoft PowerPoint got an error: The object you are trying to access does not exist" number -1728 from value of custom document property "LTWProp" of presentation of active window
I’ve defined “LTWProp” in the Custom Document Properties.
on run
tell application id "com.microsoft.PowerPoint"
activate
tell active window
tell its presentation
if value of document property "keywords" = "Fish" then
set value of document property "keywords" to "Chips"
else
set value of document property "keywords" to "Fish"
end if
—
— ???????????????
--
if value of custom document property “LTWProp" = “NO" then
set value of custom document property "LTWProp" to “YES"
else
set value of custom document property "LTWProp" to “NO"
end if
end tell
end tell
end tell
end run
_______________________________________________
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