Inspectors

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

Inspectors
 
Guest


Guest


Hello

I am having a bit of trouble using the following code - please help me.

I cant get to use the new inspector that is being created - I have no problm using the Activeinspector. But the ActiveInspector is not the one being created.

Can you please give me an example of how to do this.

I am using Delphi 8 and the .Net version. But I would also like to have the exmple in Delphi 7 cant Seem to find the event in version 2.2. The event is in version 2.3 public preview but Outlook 2000 crached using this version.

procedure TAddinModule.adxOutlookEvents_NewInspector(sender: System.Object; inspector: System.Object;
folderName: string);
var
oMailItem : MailItem;
begin
if (self.OutlookHost.Inspectors.Item(Pointer(9)).CurrentItem is MailItem) then
begin
oMailItem := (self.OutlookHost.Inspectors.Item.CurrentItem as MailItem);
oMailItem.Body := 'Test test test';
end;
Marshal.ReleaseComObject(oMailItem);
end;
Posted 21 Feb, 2005 05:23:39 Top
Eugene Starostin


Guest


Hello Guest,

Please try to replace your code with ShowMessage, for example, and let me know if the event handler runs?
Posted 21 Feb, 2005 05:37:03 Top
Guest


Guest


Hello

There are no problem executing the event - I just need to use the inspector that is being created.

The error using version 2.3 in Delphi 7 are raised when registrering the dll file from Delphi.
Posted 21 Feb, 2005 05:51:59 Top
Eugene Starostin


Guest


There are no problem executing the event - I just need to use the inspector that is being created.


In this case could you please explain me why you don't use the inspector parameter.

The error using version 2.3 in Delphi 7 are raised when registrering the dll file from Delphi.


Could you please send me your project for testing.



Posted 21 Feb, 2005 06:06:40 Top
Guest


Guest


Hello

Well using the Inspector declared as a system.object I only get basic operations which can be performed at a system.object;

The name of the object being passed is Inspector and I think the name of the class is also Inspector(I am new to Outlook addin programmer - so correct me if I am wrong). So when I creates a new variable called oInspector : inspector I only get the basic operations of the system.object. What i need is operations like CurrentItem and so on.

What I am asking for is an small example of how to use the inspector variable being passed on in the event.

You can have the project - the code of the project is not the way I normaly writes code.
Posted 21 Feb, 2005 06:13:15 Top
Guest


Guest


Concering the Error in delphi 7 i have found the mistake. The error occures when using Delphi to registry the dll file. Using Regsvr32 there are no errors.
Posted 21 Feb, 2005 06:31:24 Top
Eugene Starostin


Guest


Well using the Inspector declared as a system.object I only get basic operations which can be performed at a system.object;


What do you use as a Office type library wrapper?
Posted 21 Feb, 2005 06:33:48 Top
Guest


Guest


A little new help question.

Using then following code creates a new mail and sets som value in the email. But the email window in outlook does not show the values before the mail is send. Opening the mail after it has been send and all the things are one the rigth place.

procedure TAddInModule.adxCOMAddInModuleOLNewInspector(ASender: TObject;
const Inspector: _Inspector);
var
Mail: MailItem;
begin
mail :=inspector.CurrentItem as MailItem;
if Assigned(Mail) then
try
mail.htmlbody := self.replaceFields(self.ADOTable1.FieldByName('SIGNATUR').AsString);
mail.to_ := 'Test@test.dk';
finally
Mail := nil;
end;
end;
Posted 21 Feb, 2005 07:04:43 Top
Eugene Starostin


Guest


Jørgen Højrup,

We provide the support of the level you need for premium subscribers only.

And what do you use as a Office type library wrapper?
Posted 21 Feb, 2005 07:09:14 Top
Guest


Guest


Hello

ok (have only just bourgth for 300$ of your component).

I will buy the premium support as well if that is that is what needed.

Posted 21 Feb, 2005 07:16:07 Top