![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I've developed a COM addin for Outllook (using VB6) which places a new command bar button into the Standard toolbar. The button is created for each inspector window at the point it is opened. The button needs to have both an icon and text but I'm having trouble setting the icon. Sample code executed when the inspector loads: --------------------------------------------------------------------------------------------------------------- Set moButton = moInspector.CommandBars.Item("Standard").Controls. Add(msoControlButton, , , , True) moButton.Caption = BUTTON_CAPTION_EMAIL moButton.ToolTipText = BUTTON_TOOLTIP_EMAIL moButton.Style = msoButtonIconAndCaption moButton.Picture = VB.LoadResPicture(101, 0) ---------------------------------------------------------------------------------------------------------------- The last line of code fails and Outlook raises the following error: -2147418113 - Catastrophic failure The button displays and functions OK but without the intended icon. Interestingly the same error occurs if I try to read the Picture property into an object variable also. It seems any attempt to access this property (read or write) causes the error. Any ideas greatly appreciated. Thanks Paul. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to prohibit command bar buttons customization? | Andrey Starodoubtsev | Outlook and VBA | 1 | July 13th 06 04:02 PM |
Catastrophic Failure while accessing Redemption.SafeMailItem.To and Recipients | jisha | Outlook and VBA | 1 | June 30th 06 06:48 PM |
how to find out, that inspector window contain command bar or not | Ram | Add-ins for Outlook | 1 | May 30th 06 03:17 PM |
Command bar button FaceID Icon | donald | Add-ins for Outlook | 20 | February 9th 06 07:42 PM |
Command button not working on read page | jbtempe | Outlook - Using Forms | 2 | January 14th 06 12:25 AM |