Redemption

  • Thread starter Thread starter Christoph
  • Start date Start date
C

Christoph

I wrote a COM Add-In, which works fine normally, but crashes on some
machines or it has the Resiliency Problem.

Therefore i'm asking if I'm doing everything right.

For example:

Private obCalendarItem As Object
Private moCalendarItem As Object
....
Private Sub moCalendarItems_ItemAdd(ByVal Item As Object)
Set obCalendarItem = Item
Set moCalendarItem = New Redemption.SafeAppointmentItem
moCalendarItem.Item = obCalendarItem
End Sub
....
At Explorer_Close and On_Disconnection I set these Objects to Nothing


I read, that Redemption can cause problems and can be solved with:
set Utils = CreateObject("Redemption.MAPIUtils")
Utils.Cleanup

But I also read, that CreateObject is responsibile to the Resiliency
problem because of script stoppers.

What can i do?
 
If you have to create an object and some script blocker blocks that the
alternatives are to disable the script blocker or tell it to trust your
application, if that can be done with that script blocker. CreateObject
might possibly work better than New but it might not.
 
Thank you Ken,

but that are not good news because I have to create a lot objects.
So i'm also making database transactions within the add-in.
The recordsets have also to be crated with new. For that problem, what
would be the better solution?
Dim rst as New ADODB.Recordset
or
Dim rst as ADODB.Recordset
Set rst = New ADODB Recordset
 
I don't think there's any difference between the two.

If you have to create objects and that's blocked there's not much I can tell
you, that's a setting on the user's computer you'd have to work with.
 
Thank you Ken!

I think I included all workarounds of getting the common Add-In
problems. And now I don't know how to make it better. (I checked the
code for so many times without finding an error)
My Add-In does a lot and maybe I have to live with problems, because
the whole COM thing is buggy and can cause many problems.

Another question:
Sometimes I have to depend on the error handling because some objects
are causing errors but only in really rare cases which I don't know.
(Normally I don't get errors, when I uncomment the error handling)
Although I'm using "On error goto... or ...resume next" an error
can cause an Outlook crash?
 
It depends on what error and where it came from. I've found errors fired by
embedded Web browser controls used in some Outlook projects that will fire
errors that can't be trapped from VB or Outlook, they are Windows unhandled
exceptions and there's not much you can do with that.
 
Thank you Ken,

Maybe there are some bugs with AddInMon?
Can AddInMon cause crashs in some cases?
When using AddInMon, I'm not implementing IDTExtensibility2.

Some people told me that they have problems with Word. After closing
Outlook, Word wants to save the normal.dot.
How can it be? I'm not doing something with Word or the Word- Email
Inspector.

I think developing without bugs is not enough for Outlook Add-Ins...
 
Back
Top