• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 989
  • Last Modified:

VBA: determining creator / "last saved by" of appointment in calendar that I have shared

I have created a new blank calendar "Conf"within my account's Calendar folder. I have granted Publishing Editor permissions to several coworkers and sent them Sharing Invitations. They have opened the calendar and made appointments within it. I can see these and things are working as expected through the Outlook 2010 UI.

In VBA, I can get a successfully set reference to this calendar that I have shared as an Outlook.MAPIFolder object and its contents as a collection of Outlook.AppointmentItem :

Dim objConf As Outlook.MapiFolder
Dim objAppt As Outlook.AppointmentItem
Dim i As Integer

Set objConf = Outlook.Session.Folders("myAccout@xyz.com").Folders("Calendar").Folders("Conf")
For i = 1 to objConf.Items.Count
    Set objAppt = objConf.Items(i)
    Debug.Print i, objAppt.Subject, objAppt.Start, objAppt.Organizer
Next objAppt

Open in new window

However, the Organizer property always contains my name (seemingly because it is located within a subfolder of my calendar) rather than the person who created the appointment or last modified it.

In the UI, I can determine the last modifier by opening the appointment and looking at the right-bottom corner (in this example, my coworker, J. S.):
 last modifier shown through UI
What property of the AppointmentItem would reveal this name?


  • 2
1 Solution
David LeeCommented:
Hi, pteranodon72.

Try this.  It works for items in a public folder.  I don't have any folders shared with someone else, so I have no way to test it in the way you'd use it.  Usage will be

strName = LastModifiedName(objAppt)
Function LastModifiedName(olkItm As Object) As String
    Dim olkPA As Outlook.PropertyAccessor
    Set olkPA = olkItm.PropertyAccessor
    LastModifiedName = olkPA.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x3FFA001E")
    Set olkPA = Nothing
End Function

Open in new window

pteranodon72Author Commented:
Aha! That does the trick!

That is very helpful, thank you!

David LeeCommented:
You're welcome  Glad I could help.

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now