troubleshooting Question

How to identify deleted Outlook 2010 calendar entries within the Outlook data behind the calendar

Avatar of RiverWalk
RiverWalk asked on
Microsoft AccessOutlook
9 Comments1 Solution334 ViewsLast Modified:
I have VBA code that pulls Outlook calendar data out of Outlook and into an MS Access table, but it is retreiving deleted meetings. Is there a field within the data that I can pull, which will identidy whether or not a meeting is inactive or deleted, etc?  In my VBA, I specify which fields I want to pull from the Outlook calendar, but I don't know if  a field exists that will denote that a meeting has been deleted. If it does, then I can pull that field and within Access I can filter those records out of my resutls.

I have included a code example of how I'm pulling the data out of Outlook.


Set olItems = olFldr.Items
  iNumItems = olItems.Count
  Set db = CurrentDb
  'Commenting this line out because I do this deletion in the code that calls this function. Don't need to do it again here.
  'db.Execute "Delete * from OutlookAppointments", dbFailOnError
  Set rs = db.OpenRecordset("OutlookAppointments")
  For i = 1 To iNumItems
    If TypeName(olItems(i)) = "AppointmentItem" Then
      Set olAppt = olItems(i)
      With olAppt
        rs.AddNew
        rs!EntryID = .EntryID
        rs!StartTime = .Start
        rs!EndTime = .End
        rs!Duration = .Duration
        rs!Subject = .Subject
        rs!Location = .Location
        rs!Organizer = .Organizer
        rs!RequiredRecipients = .RequiredAttendees
        rs!OptionalRecipients = .OptionalAttendees
        'rs!Body = .Body
        ' For user-defined properties:
        ' rs!FieldName = .UserProperties("PropertyName")
        rs.Update
        iCount = iCount + 1
      End With
    End If
  Next i
  

Thank you!
Riverwalk
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 9 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 9 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros