OLE with Word

If you go for OLE, you will find that the "new" versions of Word have a new
syntax but that you can still use the old one. Try this:

procedure TForm1.Button2Click(Sender: TObject);
var
     oWord : Variant;
begin
    oWord := CreateOLEObject('word.basic');
    oWord.fileOpen('mani.doc');
    oWord.editSelectAll;
    oWord.editCopy;
    clp_butClick(self);
    oWord.fileClose(2);
    oWord.fileOpen('amanita.doc');
    oWord.editSelectAll;
    oWord.editCopy;
    clp_butClick(self);
    oWord.fileClose(2);
end;

(Don't forget to include the OleAuto unit in your uses clause)

As you can see, this handler just copies text from a Word doc to the
clipboard (where it is processed by the "clp_butClick" handler) but the
syntax will allow you to use just about any wordBasic command to do just
about anything...

(BTW, the new syntax looks like this:

>procedure TForm1.Button1Click(Sender: TObject);
>var
>     oWord : Variant;
>begin
>    oWord := CreateOLEObject('word.application');
>    oWord.visible := true;
>    oWord.documents.add(<<FileName>>);
>end;)