|
|
От: | Alex4004 | |
| Дата: | 12.10.11 11:24 | ||
| Оценка: | |||
...
var
WordApp:OleVariant;
...
begin
...
CoInitialize(nil);
WordApp:=CreateOleObject('Word.Application');
WriteToLogFile('1');
try
WordApp.DisplayAlerts:=false;
WriteToLogFile('2');
WordApp.Documents.add; //тут вылетает exception
WriteToLogFile('3');
...
except on E: Exception do
begin
WriteToLogFile(E.Message);
sf:=wdDoNotSaveChanges;
WordApp.Quit(sf);
WordApp:=Unassigned;
CoUninitialize;
end;
end;
...1
2
Ошибка в Word