A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Problem with CommandBarComboBox Change Event (Event fires only once)



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 19th 06, 01:19 PM posted to microsoft.public.outlook.program_addins
M. Khalid Farooq
external usenet poster
 
Posts: 1
Default Problem with CommandBarComboBox Change Event (Event fires only once)

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 = "htmlbodyb" + 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


Ads
  #2  
Old October 19th 06, 02:34 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Problem with CommandBarComboBox Change Event (Event fires only once)

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.

--
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" wrote in message
...
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 = "htmlbodyb" + 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



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
HOWTO: Get the CommandBarComboBox event on the inspector tonyl Add-ins for Outlook 3 November 7th 06 01:18 PM
Calendar should not change event times when time zones change. Lawrence Outlook - Calandaring 0 September 9th 06 07:29 PM
getting calendar event reminder for deleted event [email protected] Outlook - General Queries 3 September 4th 06 02:11 PM
Change event to a repeating event John Marshall, MVP Outlook and VBA 1 July 27th 06 06:05 AM
CommandbarComboBox-Event in COM Add-In (VB .net 2005) mcp_virtue Outlook and VBA 0 February 12th 06 09:00 PM


All times are GMT +1. The time now is 08:59 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.