Exception caused by BuiltInControl in Outlook AddIn

Add-in Express™ Support Service
That's what is more important than anything else

Exception caused by BuiltInControl in Outlook AddIn
 
Sam Mulholland




Posts: 9
Joined: 2005-03-07
When disconnecting my AddIn (using the COM AddIns Dialog) I get an exception raised in the TadxBuiltInControl.Uninstall method, specifically when SetInterface is called.

If I remove my BuiltInControl the problem disappears.

The BuiltInControl is on the Standard CommandBar of any Inspector (Insert File, OfficeID 1079). I also have my own TadxCommandBarControls added to this CommandBar.

I'm using ADX VCL 2.2, and have tried 2.3 with the same result

Anyone?
Posted 15 Mar, 2005 18:11:06 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Sam,

I have just tried to reproduce your situation but see no exception. I think something is missing in your description. So you can find my test add-in here.
http://www.add-in-express.com/projects/adx-ol-built-in-bug.zip

Please try to test it and let me know about the results. If I missed anything in my test add-in please add it and send the add-in to support.




Posted 16 Mar, 2005 06:14:47 Top
Sam Mulholland




Posts: 9
Joined: 2005-03-07
Dmitry,

I can compile your test addin, but Outlook refuses to load it "not a valid Office Addin" - I have never struck this before.

It may help to know further details regarding my addin:

~ I'm capturing TOutlookApplicationEvents (ItemSend)

~ I'm capturing TOutlookItemsEvents (ItemAdd on 3 folders (Inbox, Deleted and Sent))

~ Using the OnNewInspector event provided by the AddInModule I'm also capturing individual TOutlookItemEvents (Close, Open, OnForward, OnReply, OnReplyAll, OnCustomPropertyChange) and tracking each item using an ObjectList.

I'm using:

Delphi Enterprise 6 UpdatePack 2
ADX VCL 2.3 preview (or 2.2)
Outlook 2003 Service Pack 1

Thanks,

Sam.
Posted 17 Mar, 2005 15:09:31 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Sam,

I can compile your test addin, but Outlook refuses to load it "not a valid Office Addin" - I have never struck this before.

Oho! Can you give me the whole error message?

It may help to know further details regarding my addin:

Thank you for details, I will try to reproduce this once again.




Posted 18 Mar, 2005 06:42:19 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Sam,

I have just added the three points above (marked with "~"). I can't see the exception when the add-in is being disabled. Here is the link to the test add-in:
http://www.add-in-express.com/projects/adx-ol-built-in-bug.zip

The project was compiled with Delphi 6 Update Pack 2 + ADX 2.3 Public Preview. The project was tested under Windows XP SP2 with Office 2003 SP1.

Could you please send me your project.


Posted 18 Mar, 2005 08:43:24 Top
Sam Mulholland




Posts: 9
Joined: 2005-03-07
Hi Dmitry,

I have tried your second example and struck the same error:

User added an image

In my project I am not using Outlook2000.pas, but rather a unit generated using EventSinkImp so I have access to the latest objects and properties inside Outlook.

Perhaps the combination of these two is causing problems I may not be aware of. I will attempt to use Outlook2000 exclusively and see if I continue to have the same trouble.

Sam.
Posted 18 Mar, 2005 21:48:23 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Sam,

Did you try to register the add-in directly through Run -> Register ActiveX Server in Delphi IDE?

I will attempt to use Outlook2000 exclusively and see if I continue to have the same trouble.

Interesting thing. Looking forward to your results.


Posted 19 Mar, 2005 08:43:45 Top
Sam Mulholland




Posts: 9
Joined: 2005-03-07
Hi Dmitry,

Run -> Register ActiveX Server in Delphi IDE does list the AddIn in the COM Add-ins dialog, but it cannot be checked as active and shows the same error message as a result.

Using Outlook2000 exclusively does not make any difference to my situation, although it does add a bit of consistency to my code.

I have managed to work around the problem with the adxBuiltInControl error by capturing the events of the 'Insert File' buttons myself in code. It does the job required and my addin now exhibits all the correct behaviour.

It has been an interesting journey, and one I have been happy to make. Add-In Express has enabled me to quickly develop a solution for my company with much success already, so I'm not worried too much if this workaround is the answer! :)

Thanks again,

Sam.
Posted 21 Mar, 2005 00:43:43 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Sam,

Run -> Register ActiveX Server in Delphi IDE does list the AddIn in the COM Add-ins dialog, but it cannot be checked as active and shows the same error message as a result.

As far as I understand you are speaking here about the example I made for you, aren't you? I wonder why my example "is not a valid Office add-in". And are there any problems with your add-in?



Posted 21 Mar, 2005 08:59:30 Top
Sam Mulholland




Posts: 9
Joined: 2005-03-07
Dmitry,

As far as I understand you are speaking here about the example I made for you, aren't you? I wonder why my example "is not a valid Office add-in"


Yes this is when registering your add-in. There are no problems registering mine.
Posted 23 Mar, 2005 04:24:43 Top