WordApplication1.Documents.Item(1).Paragraphs.Add ;-〉 WordApplication1.Documents.Item(a).Paragraphs.Add (a);

解决方案 »

  1.   

    a是什么变量怎么定义的?再次说明我的本意:
    在打开的1.doc增加个一个段落,把2.doc追加到它的后面,但增加段落时总出错,请问上面的程序怎么改?   
      

  2.   

    “WordApplication1.”Documents.Item(1).Paragraphs.Add 应该是WordDocument1
      

  3.   

    Item是属性还是函数,如果是属性就要用[] 
      

  4.   

    不好意思我错了,Item是方法不是属性。
      

  5.   

    WordDocument.Paragraphs.Last.Range.InsertFile('Filename',EmptyParam,EmptyParam,EmptyParam,EmptyParam);
    要不行,我倒,让你踩着过。
        
      

  6.   

    num:=WordDocument1.paragraphs.Count+1;
      WordApplication1.Documents.Item(1).Paragraphs.Add ; //这条语句为什么总是不能通过??
      s:=WordDocument1.paragraphs.Item(num).range.start;
      d:=WordDocument1.paragraphs.Item(num).range.end_;
      a := 'd:\2.doc';
      WordDocument1.Range(s,d).InsertFile(a,EmptyParam,EmptyParam,EmptyParam,EmptyParam);
    都不要了