Redemption

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?
 
K

Ken Slovak - [MVP - Outlook]

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.
 
C

Christoph

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 
C

Christoph

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?
 
K

Ken Slovak - [MVP - Outlook]

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.
 
C

Christoph

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top