oh.
you can 
1.
make a mfc app (SDI or MDI ),
add a ATL object in it 
modify the  CxxxApp::InitInstance()................
if (cmdInfo.m_bRunEmbedded || cmdInfo.m_bRunAutomated)
{
//rem the return
// return TRUE;
}..........................if the com was been  call , the window would  show.2.
you can use this to get the document.
// Get the document
CComPtr<IOleContainer> spContainer; 
m_spClientSite->GetContainer(&spContainer); 
CComQIPtr<IHTMLDocument2, &IID_IHTMLDocument2> spDoc(spContainer); 
if (spDoc)
    spDoc->put_bgColor(CComBSTR(_T("pink")));
其实,我费了这么多话都是没用的,  你去看 MS 的 IEhelper 的例子, 你就全明白了。
good luck .