Old script now failing to compile ...

I have a script that used to compile for me without issue. Now, I open it, and it does not. I reduced the code down to a couple lines. Can anyone explain why?

This compiles:


tell application "Microsoft Outlook"
	set theExchangeAccount to item 1 of "exchange accounts"
end tell

This does not:

tell application "Microsoft Outlook"
	set theExchangeAccount to item 1 of exchange accounts 
end tell

Why, all of the sudden, does the AppleScript Editor not recognize “exchange accounts” without the quotes? The script is rather larger, and trying to “fix” this is a pain.

TIA
Paul

Look in Microsoft Outlook dictionary to check that exchange accounts is defined in it.

According to what I found thru Google :

tell application "Microsoft Outlook"
set the ldap server of exchange account 1 to "ldap.example.com"
end tell

it is defined.
So it’s time to check if the application is really available on the disk in use.
Maybe, like some Apple’s applications (Calendar is one of them), it must be open to allow the script editor to recognize its components.

Yvan KOENIG (VALLAURIS, France) vendredi 30 mai 2014 08:40:49

Thanks for getting back to me!

Yes, it is in the dictionary as well:

The application is on the Disk and is running almost 100% of the time.
I’ve restarted both Outlook and the Editor, and still no luck.

Any other thoughts?

TIA!!