Posts 1 - 10 of 11
First | Prev. | 1 2 | Next | Last
|
|
Jason Coley
Posts: 272
Joined: 2005-05-26
|
Hi, I have the following code in an addin and for soem reason exceptions ar being thrown each time a contact is opened. OutlookContactSTandard is a TadxOlInspector control, set to only work with contact items.
procedure TAladdins_Addin.adxCOMAddInModuleOLNewInspector(ASender: TObject;
const Inspector: _Inspector);
var
mi: OLEVariant;
begin
mi := null;
try
if Assigned(Inspector) then
mi := Inspector.CurrentItem;
if not VarIsNull(mi) then
if mi.class = olContact then
begin
if OutlookContactStandard.Controls <> nil then
begin
if OutlookContactStandard.Controls.Items[0] <> nil then
OutlookContactStandard.Controls.Items[0].Visible := ELLoaded;
if OutlookContactStandard.Controls.Items[1] <> nil then
OutlookContactStandard.Controls.Items[1].Visible := ELLoaded;
if OutlookContactStandard.Controls.Items[2] <> nil then
OutlookContactStandard.Controls.Items[2].Visible := ODLoaded;
if OutlookContactStandard.Controls.Items[3] <> nil then
OutlookContactStandard.Controls.Items[3].Visible := ODLoaded;
end;
end;
finally
mi := UnAssigned;
end;
end;
|
|
Posted 03 Jul, 2006 20:42:37
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2880
Joined: 2004-04-05
|
Hi Jason,
Try to use the OnOLInspectorActivate event instead of OnOLNewInspector.
|
|
Posted 04 Jul, 2006 07:11:27
|
|
Top
|
|
Jason Coley
Posts: 272
Joined: 2005-05-26
|
what would be the best way to check to see if the current item is a contact item then?
I tried
mi := OutlookApp.ActiveInspector.CurrentItem but that just causes errors
Jason |
|
Posted 04 Jul, 2006 17:20:10
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2880
Joined: 2004-04-05
|
Hi Jason,
Could you please send me your project (or some test project with the same behavior) for testing? Remember to indicate Outlook and Delphi versions.
|
|
Posted 05 Jul, 2006 05:25:36
|
|
Top
|
|
Jason Coley
Posts: 272
Joined: 2005-05-26
|
OK, I have just had a remote assistance session with a customer he has nortons client protection suite installed. This may be the problem as soon as I turn this off the errors go away.
Do you have any suggestions as to how to fix this?
Damn symantec and their crappy addins.
Jason |
|
Posted 06 Jul, 2006 17:52:53
|
|
Top
|
|
Jason Coley
Posts: 272
Joined: 2005-05-26
|
Another thing, I don't think this was an issue in previous versions you your addin product, but i can't be sure of this. Can I get an earlier version from your site to test this theory?
Jason |
|
Posted 06 Jul, 2006 18:01:36
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2880
Joined: 2004-04-05
|
Hi Jason,
Can I get an earlier version from your site to test this theory?
Yes, sure. Contact me directly by email.
|
|
Posted 07 Jul, 2006 04:34:37
|
|
Top
|
|
Jason Coley
Posts: 272
Joined: 2005-05-26
|
still no luck finding the solution although it does seem that a few Nortons machines are causing this, and it seems to be a corporate version of Nortons as well.
The BeforeAdd event, does this stop the whole commandbar getting added to the inspector, or just each command in the bar?
Jason |
|
Posted 12 Jul, 2006 20:23:00
|
|
Top
|
|
Dmitry Kostochko
Add-in Express team
Posts: 2880
Joined: 2004-04-05
|
Hi Jason,
The BeforeAdd event, does this stop the whole commandbar getting added to the inspector, or just each command in the bar?
Whole command bar.
|
|
Posted 13 Jul, 2006 04:38:54
|
|
Top
|
|
Jason Coley
Posts: 272
Joined: 2005-05-26
|
OK just to let people know I changed the code to the BeforeAdd event and things are fine now.
Still don't know why these other addins caused the problem or even how, but everything is cool.
I must say now using the BeforeAdd event, i don't have to check the Contact Items Messageclass, whic may be the reason it was failing. Maybe the antivirus products are blocking access to the Contact Item?
JAson |
|
Posted 26 Jul, 2006 16:17:54
|
|
Top
|
|
Posts 1 - 10 of 11
First | Prev. | 1 2 | Next | Last
|