Delphi OLE
Methods
A Delphi32 OLE Client
program that writes lines to MS Word6:
- Form containing
Edit1:TEdit, Insert,Clear:TButton.
- FormCreate: OLEServer :=
CreateOLEObject(word.basic);{MSWord wordbasic}
- OLEServer :=
FileNewDefault; {wordbasic command to create new default
doc}
- Insert.onclick: OLEServer
:= Insert(Edit1.text + #13#10);{Inserts text &
character return/line feed}
- Clear.onClick: OLEServer
:= EditSelectAll; {wordbasic command to select all in
doc}
- OLEServer := EditClear;
{wordbasic command to clear selected text in doc}
NB. MS Word 6 has different word.basic commands to MS Word 7
!!!