Hi ich habe jetzt ein programm geschrieben was Word öffnet und eine neue Seite erstellt.
Wie kann ich ihm jetzt befehlen das da zum beispiel in der 2.Zeile "Hallo" schreiben soll mit Scriftgröße 12. Ich währe sehr dankbar!
Ich benutze Delphi 6 Enterprise
Das ist mein jetziger Quelltext:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Word2000, OleServer, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
WordDocument1: TWordDocument;
WordApplication1: TWordApplication;
WordFont1: TWordFont;
WordParagraphFormat1: TWordParagraphFormat;
Button2: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
private
{ Private-Deklarationen }
public
{ Public-Deklarationen }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button1Click(Sender: TObject);
begin
Form1.WordApplication1.Connect;
Form1.WordApplication1.Visible := true;
end;
procedure TForm1.Button2Click(Sender: TObject);
begin
Form1.WordDocument1.Activate;
end;
end.