Yes "m_OldEmailCSToolBar" is a commandbar object and it is valid at the time
i'm adding the buttons.
Yes I also check the Inspector.IsWordMail() property, because i've noticed
the issues associated with it.
Yes, the code works fine when I comment out the .Picture assignment.
"Ken Slovak - [MVP - Outlook]" wrote:
You didn't answer my question, is m_OldEmailCSToolBar a CommandBar object?
So the code blows up on Outlook 2003 when you set .Picture. If you comment
out adding the image using .Picture everything's OK?
My guess is that you are actually in WordMail and that's the cause of the
error. Do you actually test for Inspector.IsWordMail() in your code?
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Andrew" wrote in message
...
Thanks for the response,
m_OldEmailCSToolBar is a global variable in the wrapper class for the
inspector. Yes, it is an Inspector Object, its an existing email item that
was opened, so No "WordMail."
Yes, it blows up on the when I set the Picture property. I've stepped
through the code and all the objects are valid. As I mentioned earlier, it
works fine when I create a "CommandBarPopup," add the popup to the
"m_OldEmailCSToolBar" and then add the button to the "CommandBarPopup."
Now
that I'm leaving out the "CommandBarPopup," its blowing up.
As a note: the same code works flawlessly in 2007 version of the Outlook
Add-in.
Help 