<div dir="ltr"><div id="m_5450617719975297086gmail-:1gg" aria-label="Message Body" role="textbox" aria-multiline="true" style="direction:ltr;min-height:85px">Hello all,<div><br></div><div>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.</div><div><br></div><div>I use Lazarus v2.2.0RC2 and FPC3.2.2.</div><div><br></div><div>I use OLEVariant, and I believe the changes have taken place in the unit ComObj, but I could be wrong.</div><div><br></div><div>PS:I do not own this code.</div><div><br></div><div>Snippet code:</div><div><br></div><div>uses comobj, variants;<br></div><div><br></div><div>...</div><div><br></div><div>procedure TForm1.SendBtnClick(Sender: TObject);<br>const<br>  olMailItem = 0;<br>  olByValue = 1;<br>var<br>  MailItem: OLEVariant;<br>  podatak: OLEVariant;<br>begin<br>  try<br>    Outlook := GetActiveOleObject('Outlook.Application');<br>  except<br>    Outlook := CreateOleObject('Outlook.Application');<br>  end;<br><br>  namespace := Outlook.GetNamespace('MAPI');<br>  namespace.logon;<br><br>  MailItem := Outlook.CreateItem(olMailItem);<br>  podatak := '<a href="mailto:test@test.com" target="_blank">test@test.com</a>';<br>  MailItem.Recipients.Add(podatak);<br>  MailItem.Recipients.ResolveAll;<br>  podatak := 'Subject';<br>  MailItem.Subject := podatak;<br>  podatak := 'Body Msg';<br>  MailItem.Body := podatak;<br><br>  MailItem.Display;//send<br><br>  Outlook := Unassigned;<br>end;<br></div><div><br></div><div>This code last worked fine while on FPC 3.2.0 but when upgraded it started erroring at the line:</div><div>MailItem<b>.Subject</b> := podatak;<br></div><div><br></div><div>Appreciate if someone can assist in pointing out something (the above code or the FPC code :)</div><div><br></div><div>Not sure if this is the right place to report this but will start here.</div><div><br></div><div>Thank you...</div><div><br></div><div>Jamal</div><div><br></div></div></div>