这是我收集的部分资料.
MSWord := CreateOLEObject('Word.Application');//连接Word
MSWord.Documents.Open(FileName:='d:/test.doc', ReadOnly:=True);//打开外部Word文档
MSWord.Visible := 0;//是否显示文件编辑
MSWord.ActiveDocument.Range(Start:=0, End:=0);//开始改变的启止位置
MSWord.ActiveDocument.Range.InsertAfter(Text:='Title');//在Word中增加字符'Title'
MSWord.ActiveDocument.Range.InsertParagraphAfter;
MSWord.ActiveDocument.Range.Font.Name := 'Arial';//字体名称
MSWord.ActiveDocument.Range.Font.Size := 24;//字体大小
word 常量对照表
unit cnsword;
interface
const
{WdColorIndex}
wdAuto = 0;
wdBlack = 1;
wdBlue = 2;
wdTurquoise = 3;
wdBrightGreen = 4;
wdPink = 5;
wdRed = 6;
wdYellow = 7;
wdWhite = 8;
wdDarkBlue = 9;
wdTeal = 10;
wdGreen = 11;
wdViolet = 12;
wdDarkRed = 13;
wdDarkYellow = 14;
wdGray50 = 15;
wdGray25 = 16;
wdByAuthor = -1;
wdNoHighlight = 0;
{WdOrientation}
wdOrientPortrait = 0;
wdOrientLandscape = 1;
{WdPaperSize}
wdPaper10x14 = 0;
wdPaper11x17 = 1;
wdPaperLetter = 2;
wdPaperLetterSmall = 3;
wdPaperLegal = 4;
wdPaperExecutive = 5;
wdPaperA3 = 6;
wdPaperA4 = 7;
wdPaperA4Small = 8;
wdPaperA5 = 9;
wdPaperB4 = 10;
wdPaperB5 = 11;
wdPaperCSheet = 12;
wdPaperDSheet = 13;
wdPaperESheet = 14;
wdPaperFanfoldLegalGerman = 15;
wdPaperFanfoldStdGerman = 16;
wdPaperFanfoldUS = 17;
wdPaperFolio = 18;
wdPaperLedger = 19;
wdPaperNote = 20;
wdPaperQuarto = 21;
wdPaperStatement = 22;
wdPaperTabloid = 23;
wdPaperEnvelope9 = 24;
wdPaperEnvelope10 = 25;
wdPaperEnvelope11 = 26;
wdPaperEnvelope12 = 27;
wdPaperEnvelope14 = 28;
wdPaperEnvelopeB4 = 29;
wdPaperEnvelopeB5 = 30;
wdPaperEnvelopeB6 = 31;
wdPaperEnvelopeC3 = 32;
wdPaperEnvelopeC4 = 33;
wdPaperEnvelopeC5 = 34;
wdPaperEnvelopeC6 = 35;
wdPaperEnvelopeC65 = 36;
wdPaperEnvelopeDL = 37;
wdPaperEnvelopeItaly = 38;
wdPaperEnvelopeMonarch = 39;
wdPaperEnvelopePersonal = 40;
wdPaperCustom = 41;
implementation
end.