• 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: Dave <email@hidden>
  • Date: Fri, 06 Nov 2015 14:50:25 +0000

Yes, I’ve tried a few things but can’t get it to work either. I even looked at it in the Scripting Bridge and the Array representing the Custom Doc Properties is always empty…..

They seem to work ok in Word and Excel though.

One thing, I tried to create a new Custom Properties which I can get to work in Word but not in Excel, please see Scripts below.

on run
	tell application id "com.microsoft.Word"
		activate

		set myDocument to the document of the front window
		set myStandardProperties to the document properties of myDocument

		delete (custom document property of myDocument whose name = "LTWCustom1")

		make new custom document property at myDocument with properties {name:"LTWCustom1", value:"Value1", type:"text"}
		set myCustomProperties to the custom document properties of myDocument

		return "OK"
	end tell
end run

Although the Make New works, the Delete doesn’t, do you have any idea how to delete one?

This is what I have for Excel, this one doesn’t work at all, I’m wondering if it’s possible to Create/Delete a new Custom Property in Excel?

on run
	tell application id "com.microsoft.Excel"
		activate

		set myDocument to the active workbook
		--set myStandardProperties to the document properties of myDocument

		delete (custom document property of myDocument whose name = "LTWCustom1")

		make new custom document property at myDocument with properties {name:"LTWCustom1", value:"Value1", type:"text"}
		set myCustomProperties to the custom document properties of myDocument

		return "OK"
	end tell
end run

All the Best
Dave

> On 4 Nov 2015, at 10:51, Christopher Stone <email@hidden> wrote:
>
> On Nov 04, 2015, at 03:45, Dave <email@hidden> wrote:
>> I tried to adapt your example to do the same to a custom document property, but the above fails on:
> ______________________________________________________________________
>
> Hey Dave,
>
> As far as I can tell they're broken:
>
> tell application id "com.microsoft.Powerpoint"
>   tell active presentation
>     custom document properties
>   end tell
> end tell
>
> --> Microsoft PowerPoint got an error: The object you are trying to access does not exist
>
> There are saved custom properties in that presentation...
>
> --
> 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


 _______________________________________________
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


References: 
 >Standard Doc Properties in Word and PowerPoint 2011 (From: Dave <email@hidden>)
 >Re: Standard Doc Properties in Word and PowerPoint 2011 (From: Christopher Stone <email@hidden>)
 >Re: Standard Doc Properties in Word and PowerPoint 2011 (From: Dave <email@hidden>)
 >Re: Standard Doc Properties in Word and PowerPoint 2011 (From: Christopher Stone <email@hidden>)

  • Prev by Date: Re: Converting shell scripts to apple scripts
  • Next by Date: Please Turn on Accessibility from the Control Panel?
  • Previous by thread: Re: Standard Doc Properties in Word and PowerPoint 2011
  • Next by thread: Weird Problem
  • Index(es):
    • Date
    • Thread