我的程序是这样的:
................
uses
      Windows,   Messages,   SysUtils,   Variants,   Classes,   Graphics,   Controls,   Forms,
      Dialogs,   StdCtrls,   Word2000;
.................
 var
      Form1:   TForm1;
      WordApplication1:   TWordApplication;
................. 
procedure TForm1.FormCreate(Sender: TObject);
begin
  try
  wordapplication1.connect;//这里报错,如果改为wordapplication.connect;则报错Object or class required;
  except
  messagedlg('word   may   not   be   installed',   mterror,   [mbok],   0);
  abort;
  end;
end;

解决方案 »

  1.   

    报错如下:
    Project Project1.exe raused exception class EAccessViolation with message 'Access violation at address 0045A4E1 in module 'Project1.ext'.Read of address 00000000'.Process stopped Use Step or Run to continue.
      

  2.   

    我安装了word了,是office xp
      

  3.   

    我改成uses wordxp;还是不行
      

  4.   

    ...var
      FWordApp, Range: Variant;
      i: integer;
    begin
        try
          FWordApp:=CreateOleObject('Word.Application');
          FWordApp.Visible:=True;
          FWordApp.Documents.Open('D:\Test.doc');
    ...
      

  5.   

    回复dinoalex: 报错 undecleared identify ‘CreateOleObject’;
      

  6.   

    为什么打开的word中不显示内容?我的D:\Test.doc 中有东西的怎么不显示?