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

Posted on 2011-10-28
Last Modified: 2012-05-12
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("").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?


Question by:pteranodon72
    LVL 76

    Accepted Solution

    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("")
        Set olkPA = Nothing
    End Function

    Open in new window

    LVL 14

    Author Closing Comment

    Aha! That does the trick!

    That is very helpful, thank you!

    LVL 76

    Expert Comment

    by:David Lee
    You're welcome  Glad I could help.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Title # Comments Views Activity
    send as works in OWA, but not outlook client 8 59
    Outlook Rules "CC"? 2 30
    Exporting Rules/Calendar/Subfolders 3 38
    exchange 6 36
    Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
    Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now