¾÷¹«¿¡´Â word ¿¡¼ text ¸¦ »Ì´Â°Å¶ó¼ ´Ù½Ã ±¸±Û¸µÇؼ ã¾Ò½À´Ï´Ù.
http://stackoverflow.com/questions/4289836/dumping-word-document-doc-to-text
Àߵdz׿ä ^^;
uses
ComObj;
function ExtractTextFromWordFile(const FileName:string):string;
var
WordApp : Variant;
CharsCount : integer;
begin
WordApp := CreateOleObject(`Word.Application`);
try
WordApp.Visible := False;
WordApp.Documents.open(FileName);
CharsCount:=Wordapp.Documents.item(1).Characters.Count;//get the number of chars to select
Result:=WordApp.Documents.item(1).Range(0, CharsCount).Text;//Select the text and retrieve the selection
WordApp.documents.item(1).Close;
finally
WordApp.Quit;
end;
end;
2012-12-14 ¿ÀÀü 4:11:29