C
cnjzy
Unregistered / Unconfirmed
GUEST, unregistred user!
代码如下:
procedure TForm1.Button1Click(Sender: TObject);
var Word: variant;
begin
try
Word:= GetActiveOleObject('Word.Application');
except
try
Word:= CreateOleObject('Word.Application');
except
Exit;
end;
end;
end;
问题是只要word 没有被打开,执行到GetActiveOleObject处就出错,显示什么
……class eolesyserror with message '操作无法使用'.process stopped.
久思不得其解
procedure TForm1.Button1Click(Sender: TObject);
var Word: variant;
begin
try
Word:= GetActiveOleObject('Word.Application');
except
try
Word:= CreateOleObject('Word.Application');
except
Exit;
end;
end;
end;
问题是只要word 没有被打开,执行到GetActiveOleObject处就出错,显示什么
……class eolesyserror with message '操作无法使用'.process stopped.
久思不得其解