X
xyw
Unregistered / Unconfirmed
GUEST, unregistred user!
如何在一个线程中通过OLE的方式来调用WORD97?
procedure TPrinterThread.Execute(Sender : TObject);
var
Word: Variant;
begin
Word := CreateOleObject('Word.Basic');
---->ERROR:未调用coInitialize
Word.FileNew('Normal');
Word.Insert('This is the first line'#13);
Word.Insert('This is the second line'#13);
Word.FileSaveAs('c:/temp/test.txt', 3);
end;
谢谢大家了!
procedure TPrinterThread.Execute(Sender : TObject);
var
Word: Variant;
begin
Word := CreateOleObject('Word.Basic');
---->ERROR:未调用coInitialize
Word.FileNew('Normal');
Word.Insert('This is the first line'#13);
Word.Insert('This is the second line'#13);
Word.FileSaveAs('c:/temp/test.txt', 3);
end;
谢谢大家了!