Is there a known issue in newer Delphi versions with OLEControl-ing i.e. Excel? I have some code which works fine when comiled with Delphi 2010:

Is there a known issue in newer Delphi versions with OLEControl-ing i.e. Excel? I have some code which works fine when comiled with Delphi 2010:
AExcel := CreateOleObject('Excel.Application');
AExcel.Workbooks.Add;
AExcel.Range[AExcel.Cells[1,6], AExcel.Cells[1,6]].Select;
AExcel.Selection.VerticalAlignment := $FFFFEFC0; //xlTop;
When compiled with XE5 or XE6 I get an error message executing the third line of code:
"Impossibile impostare la proprietà VerticalAlignment per la classe Range."
Which means "impossible to set the property VerticalAlignment of the class Range".
Same results with Excel 2010 (32 bit) on Windows 8.1 64 bit and on Windows Server 2008 R2 64 bit and with Excel 2013 (32  bit) on Windows Server 2012R2 64 bit.
This tells me that it really has to di with the Delphi version, not with actual version and combination of Windows/Office.
Any ideas?

Comments