Problem with CommandBarComboBox Change Event (Event fires only once)

M

M. Khalid Farooq

Hi,

I am having a problem with CommandBarComboBox's Change Event. I have added a
toolbar in New Email Item Inspector. It shows few CommandBarButton and one
Combo box. On ComboBox Change event, I have to set a custom HTML Contents
for the current mail item body.

My problem is that everything works perfect for the first time. I got Combo
Box. On Selecting an item I got body changed to what I desire. However it
doesn't fire Change Event on next selection. I want to make it change body
whenever user changes selection in the Combo Box. Here is the Code as how I
added this ComboBox,

Private Sub templateComboBox_Change(ByVal Ctrl As
Microsoft.Office.Core.CommandBarComboBox) Handles templateComboBox.Change

Try

Me.m_olMailItem.HTMLBody = "<html><body><b>" + Ctrl.Text +
"</b></body></html>"

Catch ex As Exception

MsgBox(ex.Message)

End Try

End Sub


There comes no exception and it works fine for first selection. On second or
later selections there is neither any change in the body nor any exception
came out. Please help me to understand whats wrong with it.

Thanks,

Khalid
 
K

Ken Slovak - [MVP - Outlook]

Don't post to multiple groups. If you must do that put all the addresses in
one post so we don't see it every group. I answered you in outlook.interop.
 

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