Assuming you actually have an ActiveExplorer(), it should work and provide
access to the CommandBars collection of that Explorer. I use
Application.ActiveExplorer.CommandBars all the time in Outlook 2007 VBA
code.
Of course if this is running somewhere other than in Outlook VBA the
Application object probably doesn't refer to Outlook.Application.
"Ashish" <akohli_2004@hotmail.com> wrote in message
news:Ow9JomdvJHA.192@TK2MSFTNGP05.phx.gbl...
> Application->ActiveExplorer->CommandBars trrow error in outlook 2007. How
> to access command bars for outlook 2007
>
I get the command bar on raw_OnStartupComplete where it throw excedption for
outlook 2007. While for outlook 2003 it's ok.
<kenslovak@mvps.org> wrote in message
news:uLm4lAevJHA.4364@TK2MSFTNGP03.phx.gbl...
> Assuming you actually have an ActiveExplorer(), it should work and provide
> access to the CommandBars collection of that Explorer. I use
> Application.ActiveExplorer.CommandBars all the time in Outlook 2007 VBA
> code.
> Of course if this is running somewhere other than in Outlook VBA the
> Application object probably doesn't refer to Outlook.Application.
> >
>
> "Ashish" <akohli_2004@hotmail.com> wrote in message
> news:Ow9JomdvJHA.192@TK2MSFTNGP05.phx.gbl...
> > Application->ActiveExplorer->CommandBars trrow error in outlook 2007. How
> > to access command bars for outlook 2007
> >
>
Try using Outlook.Application.Explorers[1] in that event handler rather than
ActiveExplorer(). See if that helps.
"Ashish" <akohli_2004@hotmail.com> wrote in message
news:e49UFS0vJHA.1536@TK2MSFTNGP05.phx.gbl...
> I get the command bar on raw_OnStartupComplete where it throw excedption
> for outlook 2007. While for outlook 2003 it's ok.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.