G
Guest
This Works in Outlook 2000 but not in 2002. Can anyone shed some light on a frustrating problem
Thanks
DS
Private Sub OutlookSearch(fFail As Boolean
Dim myOutlook As Outlook.Applicatio
Dim ns As Outlook.NameSpac
Dim itmEvents As Outlook.Item
Dim itmCount As Outlook.Item
Dim itmEvent As Outlook.AppointmentIte
Dim intResponse As Intege
Dim strMBoxTitle As Strin
strMBoxTitle = "HPI dB: Outlook Interface
Set myOutlook = New Outlook.Applicatio
Set ns = myOutlook.GetNamespace("MAPI"
Set itmEvents = ns.GetDefaultFolder(olFolderCalendar).Item
Set itmCount = itmEvents.Restrict("[EventID]=" & Me![txtEventID]
If itmCount.Count = 1 The
fFail = Fals
Set itmEvent = itmEvents.Find("[EventID]=" & Me![txtEventID]
itmEvent.Delet
ElseIf itmCount.Count > 1 The
fFail = Tru
intResponse = MsgBox("CAUTION: Multiple occurrences of this event have been found in the MS Outlook calendar!" & Chr(13) &
"Manual correction to the calendar is required.", vbCritical, strMBoxTitle
End I
Set myOutlook = Nothin
Set ns = Nothin
Set itmEvents = Nothin
Set itmCount = Nothin
Set itmEvent = Nothin
End Su
Thanks
DS
Private Sub OutlookSearch(fFail As Boolean
Dim myOutlook As Outlook.Applicatio
Dim ns As Outlook.NameSpac
Dim itmEvents As Outlook.Item
Dim itmCount As Outlook.Item
Dim itmEvent As Outlook.AppointmentIte
Dim intResponse As Intege
Dim strMBoxTitle As Strin
strMBoxTitle = "HPI dB: Outlook Interface
Set myOutlook = New Outlook.Applicatio
Set ns = myOutlook.GetNamespace("MAPI"
Set itmEvents = ns.GetDefaultFolder(olFolderCalendar).Item
Set itmCount = itmEvents.Restrict("[EventID]=" & Me![txtEventID]
If itmCount.Count = 1 The
fFail = Fals
Set itmEvent = itmEvents.Find("[EventID]=" & Me![txtEventID]
itmEvent.Delet
ElseIf itmCount.Count > 1 The
fFail = Tru
intResponse = MsgBox("CAUTION: Multiple occurrences of this event have been found in the MS Outlook calendar!" & Chr(13) &
"Manual correction to the calendar is required.", vbCritical, strMBoxTitle
End I
Set myOutlook = Nothin
Set ns = Nothin
Set itmEvents = Nothin
Set itmCount = Nothin
Set itmEvent = Nothin
End Su