_Explorer::GetCommandBars error, HRESULT is 0x90704005!!!

  • Thread starter ryotyankou via OfficeKB.com
  • Start date
R

ryotyankou via OfficeKB.com

I write a explorer wrapper for my outlook2003 addin, OnConnection, i add
existing explorers into wrapper and all are ok. But when i open a new
explorer, i use the input parameter pExplorer which show below, but While i
use it to get CommandBars, it failed with code 0x90704005, what's the wrong?
void __stdcall CToolBarObject::OnNewExplorer(IDispatch * pExplorer)
{
try
{
CComQIPtr<Outlook::_Explorer> spThisExp = pExplorer;
explorer_wrap::AddExplorer(spThisExp);
}
catch (...)
{
}
}
If i use "ActiveExplorer" instead of "pExplorer", the toolbar alway be
created on the first main explorer, as a result there are many toolbars on
first explorer, not what i wanted. And in outlook2007 my code can work.
 
K

Ken Slovak - [MVP - Outlook]

Have you tried waiting for the first Explorer.Activate() event on the new
Explorer and then tried getting its CommandBars collection?
 
R

ryotyankou via OfficeKB.com

Yeah, that's can work in outlook2003, thank you ken.
Have you tried waiting for the first Explorer.Activate() event on the new
Explorer and then tried getting its CommandBars collection?
I write a explorer wrapper for my outlook2003 addin, OnConnection, i add
existing explorers into wrapper and all are ok. But when i open a new
[quoted text clipped - 16 lines]
created on the first main explorer, as a result there are many toolbars on
first explorer, not what i wanted. And in outlook2007 my code can work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top