Outlook2000 -> Outlook2010 problems

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

Outlook2000 -> Outlook2010 problems
 
Giancarlo


Guest


I have changed the unit Outlook2000 into Outlook2010 for use the store,
but now the project doesn't compile


procedure TAddInModule.adxOutlookAppEvents1ItemLoad(ASender: TObject;
  const Item: IDispatch);
var
  IMail : _MailItem;
  FMail: TMailItem;
  L: Integer;
begin
  IMail:=nil;
  Item.QueryInterface(IID__MailItem, IMail);
  if (Assigned(IMail)) then begin
    Try
      if (Assigned(FMail)) then
        FMail.Free;
      FMail := TMailItem.Create(nil);
      FMail.ConnectTo(IMail);
    Finally
      IMail := nil;
    end;
  end;
end;


i got this error:
[dcc32 Error] ReservedMail_IMPL.pas(69): E2003 Undeclared identifier: 'TMailItem'
Posted 23 Sep, 2016 04:23:25 Top
Andrei Smolin


Add-in Express team


Posts: 18823
Joined: 2006-05-11
Hello Giancarlo,

Add-in Express is built using Outlook2000.pas. You need to cast a type that Add-in Express provides to a type from the Outlook2010 type library. Please recheck https://www.add-in-express.com/forum/read.php?FID=1&TID=12731.


Andrei Smolin
Add-in Express Team Leader
Posted 23 Sep, 2016 05:44:30 Top