diordonez
asked on
CreateOLEObject in Delphi 8 for .NET
Hi, I´m trying to develop a program automating OLE Applications such as EXCEL or AUTOCAD
I´ve tried this code for EXCEL
var
OleApplication :variant;
OleWorkBook :variant;
procedure TForm1.FormCreate(Sender: TObject);
begin
OleApplication := CreateOleObject('Excel.App lication') ;
OleApplication.visible:=Tr ue;
OleWorkBook:=OleApplicatio n.Workbook s.Add;
end;
But compiler reports this error :
[Error] Unit1.pas(104): Undeclared identifier: 'CreateOleObject'
When i try similar code for AutoCAD i gets an error in the same method.
What´s wrong ?
I´ve tried this code for EXCEL
var
OleApplication :variant;
OleWorkBook :variant;
procedure TForm1.FormCreate(Sender: TObject);
begin
OleApplication := CreateOleObject('Excel.App
OleApplication.visible:=Tr
OleWorkBook:=OleApplicatio
end;
But compiler reports this error :
[Error] Unit1.pas(104): Undeclared identifier: 'CreateOleObject'
When i try similar code for AutoCAD i gets an error in the same method.
What´s wrong ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I´ve decided to downgrade to delphi 7, and it works well