How to insert an OLE Object

  • >Could you please help me, I search how I can insert an OLE object (New and
    >from file if possible).

    Code
    procedure TWPWordForm.TBItem109Click(Sender: TObject);
    var
      obj : TWPObject;
    begin
      obj := TWPOOLEBox.Create(Self);
      TWPOOLEBox(obj).OLEContainer.InsertObjectDialog;
      obj.WidthTW  := 5000;
      obj.HeightTW := 3000;
      WPRichText1.TextObjects.Insert(obj);
    end;