PhotoShop 5.0

I need  some help.

The task is simple: to execute a set of "actions" defined in PhotoShop 5.0
from inside a Delphi application .
What is done:

1. PhotoShop type library (TypeLibrary.tlb ) was imported to Delphi project.
2. The code added to a test button is:

procedure TForm1.Button1Click(Sender: TObject);
var
   MyPhotoShop:  IPhotoshopApplication;
   FileName:     OleVariant;
begin

   MyPhotoShop:= CoPhotoshopApplication.Create;

   if OpenDialog1.Execute then
   begin
 Filename := OpenDialog1.Filename;
        MyPhotoShop.Open(FileName);
   end;

end;

3. But, the problem: I get an error message ( Exception Class:
EIntCastError; message: Interface not supported).

What am I missing ?

TIA

Fernando Vieira da Silva
fsi...@sobaite.pt