Link to home
Start Free TrialLog in
Avatar of diordonez
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.Application');
        OleApplication.visible:=True;
        OleWorkBook:=OleApplication.Workbooks.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 ?
ASKER CERTIFIED SOLUTION
Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of diordonez
diordonez

ASKER

OK, thanks  ! you´ve saved me a lot of time.

I´ve decided to downgrade to delphi 7, and it works well