I have been using this code to cancel an appointment in a shared outlook calender and mark that the appointment has been deleted (thanks for the code, can't remember where I found it now but it was not mine originally.) Private Sub Cancelled_Click()On Error GoTo ErrHandler'add your code for outlook to be objAppDim objfolder As Outlook.MAPIFolderDim objOutlook As Outlook.ApplicationSet objOutlook = CreateObject("Outlook.Application")Dim objAppt As Outlook.AppointmentItemSet objfolder = objOutlook.GetNamespace("Mapi").GetFolderFromID("00000000D7B29A73498B82499CE2942947EC8C680100D46D50BA7A253C49A52D1C23956C0BEA00000335002C0000")sFilter = "[Mileage] = " & Appt_ID & ""If Not objfolder Is Nothing ThenSet objAppt = objfolder.Items.Find(sFilter) If objAppt Is Nothing Then Dim answer As Integer answer = MsgBox("Appointment not found. Do you want to mark that this appointment has been cancelled and deleted from the diary?", vbYesNo) If answer = vbYes Then Me!DeletedFromOutlook = True DoCmd.RunCommand acCmdSaveRecord Me!Cancelled = True Else

' Set the DeletedFromOutlook flag and cancelled flag to false, save the record Me!DeletedFromOutlook = False DoCmd.RunCommand acCmdSaveRecord Me!Cancelled = False End If

End IfExit SubErrHandler:If Err.Number = -2147220991 ThenMsgBox "Open the clinic diary and try again"' Set the DeletedFromOutlook flag and cancelled flag to false, save the record Me!DeletedFromOutlook = False DoCmd.RunCommand acCmdSaveRecord Me!Cancelled = FalseElseDim Msg As StringMsg = Err.Number & ": " & Err.DescriptionMsgBox MsgEnd IfEnd IfEnd SubOnow want to make this a public module so that I can call this procedure from different forms. This is what I am using;Public Sub Cancelled_Click_Public(frmMe As Form)On Error GoTo ErrHandler'add your code for outlook to be objAppDim objfolder As Outlook.MAPIFolderDim objOutlook As Outlook.ApplicationSet objOutlook = CreateObject("Outlook.Application")Dim objAppt As Outlook.AppointmentItemSet objfolder = objOutlook.GetNamespace("Mapi").GetFolderFromID("00000000D7B29A73498B82499CE2942947EC8C680100D46D50BA7A253C49A52D1C23956C0BEA00000335002C0000")sFilter = "[Mileage] = " & Form!Appt_ID & ""If Not objfolder Is Nothing ThenSet objAppt = objfolder.Items.Find(sFilter) If objAppt Is Nothing Then Dim answer As Integer answer = MsgBox("Appointment not found. Do you want to mark that this appointment has been cancelled and deleted from the diary?", vbYesNo) If answer = vbYes Then Form!DeletedFromOutlook = True DoCmd.RunCommand acCmdSaveRecord Form!Cancelled = True Else

' Set the DeletedFromOutlook flag and cancelled flag to false, save the record Form!DeletedFromOutlook = False DoCmd.RunCommand acCmdSaveRecord Form!Cancelled = False End If