procedure TForm1.Button1Click(Sender: TObject);
var
WordApp:OleVariant;
begin
WordApp:=CreateOleObject('Word.Application');
WordApp.visible:=True;
WordApp.documents.add(Visible:=True);
WordApp.ActiveDocument.Range(Start:=0, End:=0);//开始改变的启止位置
WordApp.ActiveDocument.Range.InsertAfter(Text:='Title');//在Word中增加字符'Title'
WordApp.ActiveDocument.Range.InsertParagraphAfter;
WordApp.ActiveDocument.Range.Font.Name := 'Arial';//字体名称
WordApp.ActiveDocument.Range.Font.Size := 24;//字体大小
WordApp.ActiveDocument.Range.Font.Bold := True;//粗体
WordApp.ActiveDocument.Range.Font.Italic := True;//斜体
WordApp.Quit;
WordApp:=Unassigned;
end;