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
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