• 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
Re: Standard Doc Properties in Word and PowerPoint 2011
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Standard Doc Properties in Word and PowerPoint 2011


  • Subject: Re: Standard Doc Properties in Word and PowerPoint 2011
  • From: Christopher Stone <email@hidden>
  • Date: Wed, 04 Nov 2015 02:07:40 -0600

On Nov 03, 2015, at 09:22, Dave <email@hidden> wrote:
I’ve got a similar problem with normal document properties, this works in Word:
______________________________________________________________________

Hey Dave,

There's no need to repeat through like that when you know what property you want to look at.

These both work with the apps from Office 2011.

----------------------------------------------------------

tell application id "com.microsoft.Word"
  # USE ACTIVE DOCUMENT – IT'S FASTER.
  tell active document
    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

----------------------------------------------------------

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.

--
Best Regards,
Chris

 _______________________________________________
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: Dave <email@hidden>
References: 
 >Standard Doc Properties in Word and PowerPoint 2011 (From: Dave <email@hidden>)

  • Prev by Date: Re: Word - How to Access Custom Document Properties
  • Next by Date: Re: Word - How to Access Custom Document Properties
  • Previous by thread: Standard Doc Properties in Word and PowerPoint 2011
  • Next by thread: Re: Standard Doc Properties in Word and PowerPoint 2011
  • Index(es):
    • Date
    • Thread