Re: Exchange Calendar Access & Manipulation
Re: Exchange Calendar Access & Manipulation
- Subject: Re: Exchange Calendar Access & Manipulation
- From: Paul Berkowitz <email@hidden>
- Date: Mon, 08 May 2006 10:18:52 -0700
- Thread-topic: Exchange Calendar Access & Manipulation
On 5/5/06 9:42 AM, "Jason Bourque" <email@hidden> wrote:
> I am trying to access an exchange calendar from Entourage with AppleScript.
>
> I have an exchange account account setup and can access the calendar
> "Marketing".
>
> While in the Exchange Account: the through expanding "Public Folders"
> Folder, then expanding "All Public Folders" Folder, then clicking on
> "Marketing Calendar"
>
>
> I thought this worked a few weeks ago but no luck today. Any ideas? Any
> sample script snippets you can share?
>
> tell application "Microsoft Entourage"
> -- return properties of event id 481
>
> tell calendar id 1115
> return name -- Fails
>
> end tell
>
> End
The Exchange calendars and address books which are public folders seem to be
a special case - you can't access everything by AppleScript. Unless they are
"favorites" you will not see them in the Calendar (or Address Book) area of
Entourage, and you will not be able to access them by AppleScript either. I
don't have such a "public folder" calendar on the test Exchange account to
which I have access, so I can't test this myself, but I have seen some
references to this issue on other mailing lists.
Your bit of script above is a little vague - is there any particular reason
why you are trying to access this calendar via ID? Are you 100% positive
that calendar id 1115 even exists, and is the one you are looking for? If
you have done a database rebuild since the last time you tried this, it will
have a different ID. It's even possible that some maintenance on the
Exchange server might have "recreated" the calendar as far as Entourage is
concerned. And (see below) if the public calendar in question no longer
appears in "Favorites" under Public Folders, it will also not be part of
your Entourage database and will not be accessible by AppleScript. I'd be
willing to bet that is what is occurring here?
What happens when you do
tell app "Microsoft Entourage"
tell Exchange account 1
name of every calendar
end tell
end tell
Does it know about the public folder calendars, or just about the other
one(s)? You can check for 'kind' of each Exchange calendar if you're not
sure. If you find "Marketing" there as a name, try
It's possible that you might only be able to find this calendar, not as one
of the Exchange account's calendars (calendar elements) but only as a
subfolder of the Public Folders folder, known to Entourage AppleScript as
the 'favorites folder'. You _cannot_ access public folders which have not
been "added to favorites" in the UI. (The reason for this is that these
"Favorites" are the only public folders which are part of the Entourage
database. It was discovered early on that if all public folders were
automatically and continuously synced to Entourage, Entourage slows up to
molasses. The folders listed under "All Public Folders" are pointers only.
So you _must_ control-click one and "Add to Favorites" for it to appear in
Favorites. If such a folder is a calendar then, and only then, will it also
appear in the Calendar area of Entourage. I would guess that in such a case,
you _ought_ to find it under 'name of every calendar of Exchange account 1'
- if you can't, then it is a bug, which you should report via Entourage's
Help/Send Feedback on Entourage", and include both "AppleScript" and
Exchange in the subject. But you should be able to find the calendar this
way:
tell application "Microsoft Entourage"
tell Exchange account 1
name of every folder of (get favorites folder)
end tell
end tell
Note that in the Exchange area of Entourage (i.e. new AppleScript
functionality added in Entourage 2004 or later, which is after the original
AppleScript developer left the Mac Business Unit) there are several cases
where you unfortunately need the explicit 'get' to access elements or
properties of another property - or a variable previously set in an earlier
line . So when you know it's there, this should work:
tell application "Microsoft Entourage"
tell Exchange account 1
set marketingCalendar to folder "Marketing" of (get favorites
folder)
get properties of marketingCalendar
end tell
end tell
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden