unit Unit2;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ComObj, StdCtrls;
type
TForm2 =
class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form2: TForm2;
implementation
{$R *.dfm}
procedure TForm2.Button1Click(Sender: TObject);
var winword: variant;
begin
try
winword := GetActiveOleObject('
Word.Application')
except
winword := CreateOleObject('
Word.Application');
end;
winword.Documents.Add;
winword.Selection.InlineShapes.AddPicture('
D:\Eigene Dateien\Eigene Bilder\DSCF0092.JPG', false, true);
winword.Selection.EndKey(6);
winword.Selection.InsertBreak(7);
winword.Selection.InlineShapes.AddPicture('
D:\Eigene Dateien\Eigene Bilder\DSCF0096.JPG', false, true);
// weitere Bilder einfügen ...
winword.Visible := true;
end;
end.