For purposes of our discussion the following statements of the file OutputCOMEditor.odl are relevant.
library OutputCOMEditor
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
dispinterface IOutputCOMEditor
{
methods:
[id(1)] void ShowWindow();
[id(2)] void AddText(BSTR text);
[id(3)] long GetCursorPosition();
[id(4)] void SetCursorAtPosition(long position);
[id(5)] long GetMaximalCursorPosition();
[id(6)] void SetCursorAtStart();
[id(7)] void SetCursorAtEnd();
[id(8)] void MoveCursorBy(long offset);
[id(9)] void EndLine();
};
coclass Document
{
[default] dispinterface IOutputCOMEditor;
};
};
The above description is the source of the
CreateObject specification of the VBA code
.
The actual odl file .
For a good introductory explanation of the COM interface inner working and design see
David J. Kruglinski, Scot Wingo and George Shepherd "Programming Microsoft Visual C++ 6.0".