RT谢谢大家了,急,在线等

解决方案 »

  1.   

    function TForm1.GetDocPages(WrdDoc : TWordDocument) : integer;
    var
      ActDoc : Variant;
    begin
      ActDoc := CreateOleObject('Word.Document');
      ActDoc := WrdDoc.DefaultInterface;
      result := ActDoc.BuiltInDocumentProperties[wdPropertyPages].Value;
      ActDoc := unassigned;
    end;
      

  2.   

    谢谢 ksaiy,之前我居然忘记use comobj,一直报错。还想请问一下 ,怎么选定指定页的内容啊
      

  3.   

    在你的机器上搜索VBAWRD9.CHM这个文件,自己找吧
      

  4.   

    我看过VBA的帮助,知道用WordDocument.ActiveWindow.panws.item(1).pages.item(s)
    但是在Delphi里面一直报错,提示没有pages??