Author: Jonas Bilinkevicius
There seems to be no way to map the variant OLEObject to an interface (in our case
Word 2000) or even cast it so at design time.
Answer:
Yes there is. The OleContainer's OleObject property holds the document as an
IDispatch, and you can just cast to the interface you want. For example:
1 { ... }2 Doc: _Document;
3 { ... }4 5 OleContainer1.CreateObjectFromFile(Path, False);
6 OleContainer1.DoVerb(ovShow);
7 Doc := IDispatch(OleContainer1.OleObject) as _Document;