--- In [email protected], "Sheri" <sheri...@...> wrote:
> Definitely progress, but I haven't succeeded in invoking any of the methods > that appear on the debug listing. ===== Me neither. I can do some of the get/put properties (tom.Saved = 1, x = tom.Saved). But none of the functions. If one searches for any of "Text Object Model" vbscript ITextDocument vbscript "Text Object Model" jscript ITextDocument jscript there are no obvious sample code for ITextDocument used in a scripting language. Given how useful it would be, that makes me think there's a reason it can't be. When debugging my code: I get to OLECHAR FAR* olename = toWideChar(pszMethod); // homegrown variant of A2OLE DISPID dispid; // m_pIDispatch returned by AccessibleObjectFromWindow, // it's definitely a pointer to a ITextDocument; //this works (its how I get function descriptions): ITypeInfo *pTypeInfo = NULL; m_hr = pIDispatch->GetTypeInfo( 0, NULL, &pTypeInfo ); ... m_hr = pTypeInfo->GetFuncDesc( i, &pFuncDesc ); // but this fails: //doesn't succeed for functions, only get/put property members m_hr = m_pIDispatch->GetIDsOfNames(IID_NULL, &olename, 1, GetUserDefaultLCID(), &dispid); Still experimenting....
