How to access command bars in outlook 2007

A

Ashish

Application->ActiveExplorer->CommandBars trrow error in outlook 2007. How to
access command bars for outlook 2007
 
K

Ken Slovak - [MVP - Outlook]

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.
 
A

Ashish

I get the command bar on raw_OnStartupComplete where it throw excedption for
outlook 2007. While for outlook 2003 it's ok.
 
K

Ken Slovak - [MVP - Outlook]

Try using Outlook.Application.Explorers[1] in that event handler rather than
ActiveExplorer(). See if that helps.
 

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