Re: Problem with CommandBarComboBox Change Event (Event fires only once)
- From: "Ken Slovak - [MVP - Outlook]" <kenslovak@xxxxxxxx>
- Date: Thu, 19 Oct 2006 09:33:15 -0400
Make sure your references are staying alive and aren't being eaten by the
garbage collector. Set a module or global reference to things so they aren't
collected.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"M. Khalid Farooq" <khalid@xxxxxxxxxxx> wrote in message
news:ezHXaY38GHA.940@xxxxxxxxxxxxxxxxxxxxxxx
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
- Follow-Ups:
- Re: Problem with CommandBarComboBox Change Event (Event fires only once)
- From: M. Khalid Farooq
- Re: Problem with CommandBarComboBox Change Event (Event fires only once)
- References:
- Problem with CommandBarComboBox Change Event (Event fires only once)
- From: M. Khalid Farooq
- Problem with CommandBarComboBox Change Event (Event fires only once)
- Prev by Date: Problem with CommandBarComboBox Change Event (Event fires only once)
- Next by Date: Outlook 2003 pia location
- Previous by thread: Problem with CommandBarComboBox Change Event (Event fires only once)
- Next by thread: Re: Problem with CommandBarComboBox Change Event (Event fires only once)
- Index(es):
Relevant Pages
|