I'm trying to get an IMarkupServices interface pointer (amonst other things) from an IHTMLDocument2 pointer which was obtained from a Running object (Internet explorer application already loaded with a web page). I noticed that I also couldn't place the document into edit mode using IHTMLDocument2:ut_designMode(L"On") which returns E_INVALIDARG.

//IHTMLDocument2 *pIHTMLDoc2; // valid pointer to document
IMarkupServices *pIMS;

hr = pIHTMLDoc2->put_designMode(L"On"); // returns E_INVALIDARG
.
.
// following returns E_NOINTERFACE
hr = pIHTMLDoc2->QueryInterface(IID_IMarkupServices,(void **)&pIMS);

This is exactly how microsoft says to do it, yet it doesn't work? Any ideas? Is it because iexplore.exe limits its mshtml editing somehow?