Inspector.Caption problem

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

Inspector.Caption problem
 
Guest


Guest


Hi, I took your OutlookSkeleton1 and added a bar with a button. In the onclick I have

ShowMessage(OutlookApp.ActiveInspector.Caption);
ShowMessage(OutlookApp.ActiveExplorer.Caption);

Line 1 does throw an error, line 2 is ok.

My goal: Get to the currently selected MailItem to e. g. show the .Body.

Thanks!
Posted 05 Mar, 2005 15:33:22 Top
Eugene Starostin


Guest


Thank you for your tip.
Posted 06 Mar, 2005 05:00:22 Top
Guest


Guest


? I hoped for help ;-)
Posted 06 Mar, 2005 05:26:35 Top
Dmitry Kostochko


Add-in Express team


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

Try the following code:

begin
if OutlookApp.ActiveExplorer <> nil then
if OutlookApp.ActiveExplorer.Selection.Count > 0 then begin
OutlookApp.ActiveExplorer.Selection.Item(1).QueryInterface(IID__MailItem, IMail);
if Assigned(IMail) then
try
ShowMessage(IMail.Body);
finally
IMail := nil;
end;
end;
end;
Posted 07 Mar, 2005 06:17:13 Top