Что-то вроде этого:
STDMETHODIMP CBlogUrlSnaggerAddIn2::Exec(
const GUID *pguidCmdGroup, DWORD nCmdID,
DWORD nCmdExecOpt, VARIANTARG *pvaIn, VARIANTARG *pvaOut)
{
BSTR locationUrl;
BSTR locationName;
m_spWebBrowser->get_LocationURL(&locationUrl);
m_spWebBrowser->get_LocationName(&locationName);
MessageBox(NULL, locationUrl, locationName, 0);
::SysFreeString(locationUrl);
::SysFreeString(locationName);
return S_OK;
}