to xbrid:我的代码是这样的,我在里面加了个vselection.insertrowsbelow(10);但出错procedure Tnotes_q.PrintBtnClick(Sender: TObject);var templateName: OleVariant; newTemplate: OleVariant; ItemIndex: OleVariant; vSelection: WordSelection; vBookMark: BookMark; vTable: Table; I,j,col:integer; memonum,linetotal:string;begin wordApp := TWordApplication.Create(Application); memonum:=answer3.Lines.Text; col:=0; if length(answer3.Lines[0])<=72 then linetotal:='' else if length(answer3.Lines[0])>72 then linetotal:=#13+copy(answer3.Lines[0],73,length(answer3.Lines[0])-72); //构造打印模板文件名全路径 templateName := folderName + 'a1.dot' newTemplate := False; try wordApp.Connect(); except MessageDlg('您的计算机上还未安装Microsoft Office Word97或更高的版本!', mtError, [mbOK], 0); Abort; end; //以指定的模板文件创建新Word文档 wordApp.Documents.AddOld(templateName, newTemplate); vSelection := wordApp.Selection; for j:=0 to answer3.Lines.Count-1 do begin col:=col+((length(answer3.lines[j])+71) div 72); if (integer(answer3.lines[j]) mod 72)>0 then col:=col+1; end; vTable := wordApp.ActiveDocument.Tables.Item(2); if (col>1) and (col<=18) then begin for j:=1 to answer3.Lines.Count do begin linetotal:=linetotal+#13+(answer3.Lines[j]); vTable.Cell(1, 1).Range.Text := linetotal; end; vTable.Select; vSelection.insertrowsbelow(10); end; wordApp.Visible:=true; //最大化 wordApp.WindowState := 1; //打印预览 if view.Checked then wordApp.PrintPreview:=true;end;我是用上面的方法弄的,wordApp:TwordApplication定义这个对象,然后我用vselection.Insertrowsbelow(10);为什么会出错,显示types of actual and formal var parameters must be identical;