• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Standard Doc Properties in Word and PowerPoint 2011
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Standard Doc Properties in Word and PowerPoint 2011
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: Word - How to Access Custom Document Properties
  • Next by Date: Calendar - the big hangover
  • Previous by thread: Re: Calendar - the big hangover
  • Next by thread: Re: Standard Doc Properties in Word and PowerPoint 2011
  • Index(es):
    • Date
    • Thread