Missing TOM.h ?
You can create it from riched20.dll / msftedit.dll and rename it to tom.h
After that you can
SendMessage(hREdit, EM_GETOLEINTERFACE, 0, (LPARAM)&pRichEditOle);
HRESULT hr = pRichEditOle->lpVtbl->QueryInterface(pRichEditOle, &IID_ITextDocument, (void **)&pDocument);
and
VARIANT v;
v.vt = VT_BSTR;
v.bstrVal = SysAllocString(szFileName);
HRESULT hr = pDocument->lpVtbl->Open(pDocument, &v, 0x30, 0); // 0x30 tomOpenExisting
SysFreeString(v.bstrVal);
EDIT: Windowless RE with msftedit.dll 32-bit, by faking __thiscall with __fastcall