Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Forms / June 2007

Tip: Looking for answers? Try searching our database.

AppointmentItem BeforeDelete Event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Khyati - 25 Jun 2007 03:35 GMT
We are using Outlook to schedule web conferences and using outlook 2003. My
question is regarding the BeforeDelete event. BeforeDelete Event has been
coded in .net(2003) code behind using vb.net. when I right click on a
scheduled meeting on the calendar and click on delete, it rarely goes to the
BefreDelete event in code behind. So it just delete the meeting from the
calendar and meeting is still in there in our SQL database as it doesnt go to
BeforeDelete Even where the delete functionality has beeen coded. Could you
please help me on this.
John Guin - 26 Jun 2007 05:58 GMT
when you save "rarely" for the delete event firing, do you mean "the event
fires but not consistently" or "the event never fires?"

If not consistently, have you made a list of variables on the occasions on
which it does not fire (like it never fires on the slowest machine we use, it
only fires when I step through the code in the debugger, it never fires if I
have some certain addin installed, etc...)

If that process help narrow it down, please post which .net framework you
are using, the relevant code, Outlook details (exchange server, POP, cached
mode, etc...).  Maybe that would help locate the problem.

Thanks,
John

> We are using Outlook to schedule web conferences and using outlook 2003. My
> question is regarding the BeforeDelete event. BeforeDelete Event has been
[quoted text clipped - 4 lines]
> BeforeDelete Even where the delete functionality has beeen coded. Could you
> please help me on this.
Khyati - 28 Jun 2007 03:10 GMT
It s really hard to understand. Sometimes it fires on debug mode and
sometimes when not debugging. But sometimes it doesnt fire even on the debug
mode.

My code is:

Private Sub m_olAppointmentItem_BeforeDelete(ByVal Item As Object, ByRef
Cancel As Boolean) Handles m_olAppointmentItem.BeforeDelete
       'Only runs the customized codes if it is vMeetingForOutlook form
       If m_olAppointmentItem.FormDescription.Name.Trim.ToLower <>
"vMeetingForOutlook".ToLower Then Exit Sub

       Try
           'm_olAppointmentItem_Open(Cancel)
           g_ResID = CType(GetOutlookProperty(m_olAppointmentItem,
"ResID").Value, Integer)
           g_bIsMCUAppointment =
CType(GetOutlookProperty(m_olAppointmentItem, "IsMCUAppointment").Value,
Boolean)
           g_bIsReservationlessLookup =
CType(GetOutlookProperty(m_olAppointmentItem, "IsMeetingRoom").Value, Boolean)
           If Not g_bIsReservationlessLookup Then
               System.Windows.Forms.Application.DoEvents()
               Common.ErrorHandler.Log("m_olAppointmentItem_BeforeDelete",
"")
               GetOutlookProperty(m_olAppointmentItem,
"IsMCUAppointment").Value = False
               Cancel = Not XMLAppointment()
           End If
       Catch ex As COMException
           SendErrorDetails(ex.ToString.Trim,
"m_olAppointmentItem_BeforeDelete - (COMException) ")
           Common.ErrorHandler.HandleException(ex)
           Cancel = True
       Catch ex As System.Exception
           SendErrorDetails(ex.ToString.Trim,
"m_olAppointmentItem_BeforeDelete")
           Common.ErrorHandler.HandleException(ex)
           Cancel = True
       End Try
   End Sub

We are using .net framework 1.1 and outlook 2003.

> when you save "rarely" for the delete event firing, do you mean "the event
> fires but not consistently" or "the event never fires?"
[quoted text clipped - 19 lines]
> > BeforeDelete Even where the delete functionality has beeen coded. Could you
> > please help me on this.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.