S
StevenBr
I am using VB6 to create a simple Outlook add-in that temporarily adds a
commandbar with one button to the Outlook message form. I've used various
samples on both support.microsoft.com and in "Building Applications with
Outlook".
When I set the picture property as follows, I get an error in the picture
method:
Dim cbrTessOLBar As CommandBar
Dim cbTessOLLogSend As CommandBarButton
Dim picPicture As IPictureDisp
Set cbrTessOLBar = Inspector.CommandBars.Add("cbTessOL", msoBarTop, True)
Set cbTessOLLogSend = cbrTessOLBar.Controls.Add(msoControlButton)
cbTessOLLogSend.Style = msoButtonIconAndCaption
cbTessOLLogSend.Caption = "Log && Send"
Set picPicture =
stdole.StdFunctions.LoadPicture("t:\projects\emaillogging\imp256.bmp")
cbTessOLLogSend.Picture = picPicture
cbTessOLLogSend.Visible = True
cbrTessOLBar.Visible = True
I've read that the picture property doesn't support marshalling across
process, so it doesn't surprise me that I get this error when running the
add-in DLL in the VB IDE. However, when it's compiled and used within
Outlook, the error persists.
Is it even possible to set the command bar button's picture property in an
Outlook add-in?
Thanks.
commandbar with one button to the Outlook message form. I've used various
samples on both support.microsoft.com and in "Building Applications with
Outlook".
When I set the picture property as follows, I get an error in the picture
method:
Dim cbrTessOLBar As CommandBar
Dim cbTessOLLogSend As CommandBarButton
Dim picPicture As IPictureDisp
Set cbrTessOLBar = Inspector.CommandBars.Add("cbTessOL", msoBarTop, True)
Set cbTessOLLogSend = cbrTessOLBar.Controls.Add(msoControlButton)
cbTessOLLogSend.Style = msoButtonIconAndCaption
cbTessOLLogSend.Caption = "Log && Send"
Set picPicture =
stdole.StdFunctions.LoadPicture("t:\projects\emaillogging\imp256.bmp")
cbTessOLLogSend.Picture = picPicture
cbTessOLLogSend.Visible = True
cbrTessOLBar.Visible = True
I've read that the picture property doesn't support marshalling across
process, so it doesn't surprise me that I get this error when running the
add-in DLL in the VB IDE. However, when it's compiled and used within
Outlook, the error persists.
Is it even possible to set the command bar button's picture property in an
Outlook add-in?
Thanks.