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

Status
Not open for further replies.
R

ryotyankou

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?

"ryotyankou " <u48591@uwe> wrote in message

news:9bda6e3c13ac0@uwe...
> 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.

> >
>
>
 
R

ryotyankou

Yeah, that's can work in outlook2003, thank you ken.
- wrote:
> 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.


 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
K Working with Explorer.Close event Outlook VBA and Custom Forms 3
R Quick Access view in File Explorer when saving attachments Using Outlook 0
R Sending emails via Outlook XP, from Windows 10 File Explorer Using Outlook 1
P Automate Outlook Start - No Active Explorer Object Found Using Outlook 10
K Macro Not Executing then send email from Explorer Outlook VBA and Custom Forms 3
I Windows 10 - .msg files on disk show Explorer popup error Using Outlook 5
M Question: Is there a rule that will save email in Windows Explorer Outlook VBA and Custom Forms 3
oliv- How to select an mailitem in explorer with "show as conversation" Outlook VBA and Custom Forms 8
Michael Chiasson PST file shows 300+MB in Windows Explorer, but only 250kb in Outlook 2010 Using Outlook 1
P Was Helvetica crashing Outlook, now fix has messed up explorer Using Outlook 4
R Outlook 2007 - drag drop email to Explorer Using Outlook 1
A vb6 run time error 5 when Outlook 2007 Explorer object displayed Outlook VBA and Custom Forms 1
C Create a Ribbon for the OL2010 Explorer Outlook VBA and Custom Forms 1
E Can I hide an explorer or make an explorer modal Outlook VBA and Custom Forms 2
E Can I hide an explorer or make an explorer modal Outlook VBA and Custom Forms 2
A Active explorer issue Outlook VBA and Custom Forms 15
S How to italicize the email entry in explorer window Outlook VBA and Custom Forms 3
T Creating toolbar in new Explorer Outlook VBA and Custom Forms 3
S Strange Behaviour of Explorer Object. Outlook VBA and Custom Forms 1
T Is Explorer.FolderSwitch the best event for hiding commandbarbutton? Outlook VBA and Custom Forms 5
R destroying Explorer object pointers on shutdown Outlook VBA and Custom Forms 2
U Not able to delete Add-in button from multiple Outlook Explorer Outlook VBA and Custom Forms 1
A Links in email getting error message about group policy Using Outlook 4
Aussie Outlook 365 Rule runs manually but returns the error code "an unexpected error has occurred" when incoming mail arrives Using Outlook 1
Cathy Rhone Mail merge error message Using Outlook 2
U Outlook 2019 VBA run-time error 424 Outlook VBA and Custom Forms 2
V Outlook error 500 Using Outlook 2
O Comma Separated Values.ADR and A file error has occurred in the translator Using Outlook 6
D We're sorry but outlook has run into an error Using Outlook 6
D Outlook 2016 Outlook Error Msg "The operation cannot be performed ..." How to Stop it Using Outlook 4
P Outlook 2013 All imported Mail Rules in error when imported into new profile Using Outlook 5
H Outlook 2019 Certificate error Using Outlook 2
V Date and/or time error in Outlook Form Outlook VBA and Custom Forms 0
A Run-time error '430' on certain emails when trying to set "Outlook.mailitem" as "ActiveExplorer.Selection.Item" Outlook VBA and Custom Forms 2
E Complite error on SaveAsFile method Outlook VBA and Custom Forms 2
I Error saving screenshots in a custom form in outlook 2016, outlook 365 - ok in outlook 2013, outlook 2010 Outlook VBA and Custom Forms 5
D Outlook VBA error extracting property data from GetRules collection Outlook VBA and Custom Forms 10
A Unable to save recurring Meeting to Documents folder due to error Using Outlook 2
M Compile error: User-defined type not defined Outlook VBA and Custom Forms 0
R Error when trying to forward current email item Outlook VBA and Custom Forms 7
M ERROR: None of your email accounts could send to this recipient Using Outlook 2
J OLADD.FAE Error When Exporting Contacts Using Outlook 6
C Send/receive error 80040119 Using Outlook 2
W error with the permission for the file Outlook VBA and Custom Forms 0
L Outlook 2019 MAC sync error after working for 4 hours Using Outlook 1
A Run time error 424. object required in outlook 2013 Outlook VBA and Custom Forms 10
M error code 0x8DE00006 Using Outlook 1
M Desktop Version Of Outlook Generating Error Using Outlook 4
M Send/Receive error 0x800CCC0F Using Outlook 0
T Outlook 2016 CSV Translator Import Error Using Outlook 6

Similar threads

Top