VARIANT vt;
COleVariant vaUrl=_T("E:\\ie.html");
m_web.Navigate2(vaUrl,&vt,&vt,&vt,&vt);
IDispatch *pDisp=m_web.GetDocument();
IHTMLDocument2 *pDocument;
IHTMLElementCollection *pCollection;
pDisp->QueryInterface(IID_IHTMLDocument2,(void**)&pDocument);
HRESULT hr;
hr = pDocument->get_all(&pCollection);
if(hr==S_OK)
{
hr=pCollection->item(COleVariant("xianshi"),COleVariant((long)0),&pDisp);
}
if ( hr == S_OK )
{
IHTMLElement *pElement;
hr = pDisp->QueryInterface(IID_IHTMLElement,(void**)&pElement);
if ( hr == S_OK )
{
}
}