> NewInspector provides a weak object reference and should not be used for
> creating UI. Wait for the first Activate event. In fact in Outlook 2007 this
> is even more important than in earlier versions.
>
> Always add any UI with the Temporary argument set to true. When you get the
> Inspector.Close (or Item.Close since one or the other may not fire depending
> on how the item is closed) also delete your UI.
>
> --
> Ken Slovak
> [MVP - Outlook]
>
http://www.slovaktech.com> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
>
http://www.slovaktech.com/products.htm>
>
> "bstrum" <bstrum[ at ]discussions.microsoft.com> wrote in message
> news:6078BF6A-0D97-44F5-9249-540A30B23F65[ at ]microsoft.com...
> >I am trying to create a command bar in the NewInspector event. The code
> > seems to be working fine on Office 2003 and 2007 but throws an exception
> > in
> > Office XP when I access the CommandBars.Add function. Any ideas why?
> >
> > Other things I am noticing are
> > - CommandBar.FindControl always seems to return null.
> >
> > - Under office xp, adding controls to an already existing command bar
> > (such
> > as Standard) persists even when restarting outlook. This is not the case
> > under 2003 and 2007 as the buttons need to be recreated each time. Any
> > workarounds for this?
> >
> > Thank you,
> >
> > Benjamin Strum
> > ThinkTron Corp.
>
>