[Lazarus] Code generates an error after upgraded to FPC 3.2.2
jamal.gabra at gmail.com
Tue Nov 16 12:27:29 CET 2021
I just found out that something has changed from FPC 3.2.0 to FPC 3.2.2
that is starting to cause error in a simple app I developed to send emails
through MS Outlook.
I use Lazarus v2.2.0RC2 and FPC3.2.2.
I use OLEVariant, and I believe the changes have taken place in the
unit ComObj, but I could be wrong.
PS:I do not own this code.
uses comobj, variants;
procedure TForm1.SendBtnClick(Sender: TObject);
olMailItem = 0;
olByValue = 1;
Outlook := GetActiveOleObject('Outlook.Application');
Outlook := CreateOleObject('Outlook.Application');
namespace := Outlook.GetNamespace('MAPI');
MailItem := Outlook.CreateItem(olMailItem);
podatak := 'test at test.com';
podatak := 'Subject';
MailItem.Subject := podatak;
podatak := 'Body Msg';
MailItem.Body := podatak;
Outlook := Unassigned;
This code last worked fine while on FPC 3.2.0 but when upgraded it started
erroring at the line:
MailItem*.Subject* := podatak;
Appreciate if someone can assist in pointing out something (the above code
or the FPC code :)
Not sure if this is the right place to report this but will start here.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the lazarus