WordApplication1.Connect;
WordApplication1.Visible:=true;
if not OpenDialog1.Execute then
Exit;
FileName:=OpenDialog1.FileName;
WordApplication1.Documents.Open( FileName, EmptyParam,EmptyParam, EmptyParam,
EmptyParam, EmptyParam,EmptyParam, EmptyParam, EmptyParam, EmptyParam,EmptyParam,
EmptyParam,EmptyParam ,EmptyParam,EmptyParam);
ItemIndex := 1;
WordDocument1.ConnectTo(WordApplication1.Documents.Item(ItemIndex));
//WordApplication1.Options.CheckSpellingAsYouType := False;
// WordApplication1.Options.CheckGrammarAsYouType := False;
WordDocument1.Select;
memo1.Lines.Add(WordApplication1.Selection.Text);
这个能把选中的文档打开,而且把文档整个内容放到memo中,我想知道,怎么选取一行,放到memo中,谢谢大虾!