第1个要求:
在窗体上放一个OLECONTAINER和一个WORDAPPLICATION控件,再放一个按钮,
在按钮的事件里如此写:
//OleContainer1.CreateObjectFromFile ('A Test File Path', False); //A test File为一指定WORD文档
OleContainer1.DoVerb (ovInPlaceActivate);
WordApplication1.ConnectTo(IDISPATCH (OleContainer1.OleObject.Application) as _Application);
//WordApplication1.ActiveDocument.Paragraphs.Last.Range.InsertAfter('It''''s OK!');