ComboBoxChange Event doesn't work (VB .net 2005)

M

mcp_virtue

Hi,

I am working on a COM-AddIn and therefore I need the ChangeEvent of a
ComboBox I added to Outlook 2003.
But I don't know how to do it. I looked for tipps or code snippets and found
some; but they don't work!

here is my code:

Dim olMeeting As AppointmentItem
Dim WithEvents myBox As CommandBarComboBox, myBar As CommandBar

Public Sub OnConnection(ByVal ...) implements ...
myApp = New Microsoft.Office.Interop.Outlook.Application
olMeeting = myApp.CreateItem(OlItemType.olAppointmentItem)

myBar = olMeeting.GetInspector.CommandBars.Add(Name:="MyCombo", _
Position:=MsoBarPosition.msoBarTop, Temporary:=False)

myBox =
myBar.Controls.Add(Type:=MsoControlType.msoControlDropdown)

myBar.Visible = True

End Sub


myBox.OnAction doesn't work
the other comfortable way through selecting the event from the environment
doesn't work either.

What am I making wrong?

thx for help (I posted this thread first in outlook vba programming; but
thought some of you wouldn't see that ^^)
 
M

mcp_virtue

I found the problem:

the Change Event doesn't work because I added that Combobox to an
AppointmentItem! It works else in the ActiveExplorer of OUtlook (with
..OnAction Method!)
To have the Change Event work in an AppointmentItem, I think of an
"Explorer" in that Item.
But, actually there is no Explorer for Items; only for Outlook itself!

best regards
 

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