I was curious if there is a way to use a form in access and send that data to the default outlook calendar as an appt. I have tried this code but it doesn't seem to work.
Code:
Dim olApp As Outlook.Application Dim objAppointment As Outlook.AppointmentItem Dim objAppointments As Outlook.MAPIFolder Dim objNameSpace As Outlook.NameSpace Dim objProperty As Outlook.UserProperty Dim OutlookStartTime, OutlookEndTime As Date Dim sFilter As Variant OutlookStartTime = CDate(ap_date & " " & ap_start_time) OutlookEndTime = CDate(ap_date & " " & AP_End_Time) Set olApp = CreateObject("Outlook.Application") Set objNameSpace = olApp.GetNamespace("MAPI") Set objAppointments = objNameSpace.GetDefaultFolder(olFolderCalendar) sFilter = "[Start] = '" & Format(OutlookStartTime, "ddddd h:nn AMPM") & _ "' And [End] = '" & Format(OutlookEndTime, "ddddd h:nn AMPM") & "' " & _ " And [Subject] = '" & Me.ap_with_whom & " - " & Me.ap_type & "'" Set objAppointment = objAppointments.Items.Find(sFilter) If Not TypeName(objAppointment) = "Nothing" Then objAppointment.Delete End If Set objAppointment = Nothing Set objAppointments = Nothing
Comment