Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Outlook 2007 Ribbon Minimized ComboBox OnChange

Geek News

Outlook 2007 Ribbon Minimized ComboBox OnChange
n777krish[ at ]gmail.com 2/10/2007 12:26:36 AM
Hello All,

I have added a Combobox through code onto a new group on the RibbonX
in Outlook 2007.

I am finding a problem with the Combobox when the ribbon is minimized.

On the Combobox_OnChange callback, I am putting a messagebox as
"Msgbox "Test"".
When I change the combo box this message does not come up.

Now, If I put two message boxes as follows:
Msgbox "Test"
Msgbox "Test 1"

what I find is that the First messagebox never shows up but the second
one does.

If I put three message boxes then the second two show up but the first
one for some reason does not.

This only happens when the Ribbon is minimized.
I am testing this on Outlook 2007 B2TR.

Any ideas any one?

Another problem that I am facing is that, when I drag my Group onto
the QuickAccess Toolbar.
When the group is on the QAT I find that if the ribbon is minimized
and I change the selection on the combobox it does not get updated on
the RibbonX when I maximize it. It updates ok the Ribbon is maximized.
But here another problem occurs that when I change the selection from
the Ribbon it is not updated on the QAT.

Any pointers on this?

I would appreciate any help.
Regards,
Neil Goundar.

Re: Outlook 2007 Ribbon Minimized ComboBox OnChange
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 2/12/2007 3:50:59 PM
How are you doing this, VB 6? Have you tested this at all with the RTM
version of Outlook 2007? I wouldn't even bother with any of the beta
versions at this point.

Can you show the code and XML you are using so someone else can test this?

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


<n777krish[ at ]gmail.com> wrote in message
news:1171067196.596026.324280[ at ]v45g2000cwv.googlegroups.com...
[Quoted Text]
> Hello All,
>
> I have added a Combobox through code onto a new group on the RibbonX
> in Outlook 2007.
>
> I am finding a problem with the Combobox when the ribbon is minimized.
>
> On the Combobox_OnChange callback, I am putting a messagebox as
> "Msgbox "Test"".
> When I change the combo box this message does not come up.
>
> Now, If I put two message boxes as follows:
> Msgbox "Test"
> Msgbox "Test 1"
>
> what I find is that the First messagebox never shows up but the second
> one does.
>
> If I put three message boxes then the second two show up but the first
> one for some reason does not.
>
> This only happens when the Ribbon is minimized.
> I am testing this on Outlook 2007 B2TR.
>
> Any ideas any one?
>
> Another problem that I am facing is that, when I drag my Group onto
> the QuickAccess Toolbar.
> When the group is on the QAT I find that if the ribbon is minimized
> and I change the selection on the combobox it does not get updated on
> the RibbonX when I maximize it. It updates ok the Ribbon is maximized.
> But here another problem occurs that when I change the selection from
> the Ribbon it is not updated on the QAT.
>
> Any pointers on this?
>
> I would appreciate any help.
> Regards,
> Neil Goundar.
>

Re: Outlook 2007 Ribbon Minimized ComboBox OnChange
n777krish[ at ]gmail.com 2/13/2007 3:32:15 AM
Hello Ken,

Thank you for your reply.

I will get the latest version of Outlook 2007 tomorrow and test this
and get back to you on this.

Thanks,
Neil Goundar.


Re: Outlook 2007 Ribbon Minimized ComboBox OnChange
n777krish[ at ]gmail.com 2/15/2007 5:03:32 AM
Hi Ken,

I have got the Trial version of Office 2007 Enterprise Edition and I
am still seeing some wierd issues.

1. The messages not showing issue seems to appear on one of Outlook's
built-in control on my machine. Could you test the following:


Compose a new e-mail. (Ensure that the Ribbon is maximized) Click in
the body of the e-mail. Go to "Message" Tab > In the Font Size combo
box Type in -85 and press enter. A message saying "The number must be
between 1 and 1638." should be displayed.

Now, Minimize the Ribbon and Carry out the same test. Go to Message
Tab > Type in -85 and Press Enter. No message comes up on my machine,
the ribbon just minimizes.

Do you get the same results? What do I do about this?

I also observe that the message box does not appear if I enter a new
item into the combo box in my addin.

2. The second problem still exists:
When I drag my Group onto the QuickAccess Toolbar.
When the group is on the QAT I find that if the ribbon is minimized
and I change the selection on the combobox on the QAT it does not get
updated on the RibbonX when I Goto the message tab where mygroup is
located. It updates ok the Ribbon is maximized.

Also I observe the following:
If the Ribbon is maximized but I have the Group on the QAT also, I
make a change in the combobox on the QAT. I close the current
inspector and open up another inspector. The Combobox on the ribbon
comes out empty but the combobox on the QAT retains the last selected
value.

I am invalidating the combobox using the IRibbonUI object on Inspector
activate. The invalidating does not seem to take effect on both of the
comboboxes.

My code structure is as follows:
When the user selects an item from the drop down
(cboProject_OnChange), a user property is added to the mailitem. This
is saved in the e-mail. The GetText function returns the value in this
property that is added to the item.

I have a designer which Implements IRibbonExtensibility. All callbacks
are defined in this designer.

The following function returns the XML that I am using (with some
unneccessary buttons removed):

Public Function GetRibbonMailCompose() As String

Dim sRibbonXML As String

sRibbonXML = "<customUI xmlns=""http://schemas.microsoft.com/
office/2006/01/customui"" onLoad=""Ribbon_OnLoad"" >" & _
"<ribbon>" & _
"<tabs>" & _
"<tab idMso=""TabNewMailMessage"" >" & _
"<group id=""QuickFile"" label=""QuickFile"">" & _
"<comboBox id=""cboProject"" label=""Project""
onChange=""cboProject_OnChange"" getText=""cboProject_GetText""
getItemCount=""cboProject_GetItemCount""
getItemLabel=""cboProject_GetItemLabel"" />" & _
"<separator id=""s2""/>" & _
"<comboBox id=""cboPrint"" label=""Print""
onChange=""cboPrint_OnChange"" getText=""cboPrint_GetText""
getItemCount=""cboPrint_GetItemCount""
getItemLabel=""cboPrint_GetItemLabel"" />" & _
"<button id=""cmdHelp"" onAction=""cmdHelp_Click""
label=""&Help"" getSupertip=""cmdHelp_GetSupertip""
imageMso=""Help"" />" & _
"</group >" & _
"</tab>" & _
"</tabs>" & _
"</ribbon>" & _
"</customUI>"

GetRibbonMailCompose = sRibbonXML

End Function

I am initializing a Global IRibbonUI object on the Ribbon_OnLoad
callback which i use to invalidate the comboboxes.

Ken, Do you have any sample code in VB6.0 or any addin with combo
boxes on the ribbon written in VB6 that I could test on my machine
possibly.

Thank you for your help.

Regards,
Neil Goundar.

Re: Outlook 2007 Ribbon Minimized ComboBox OnChange
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 2/15/2007 3:27:25 PM
I'll play with your code later today or tomorrow and see what I can come up
with. I have no combobox code in VB 6, VB.NET or C# for either the ribbon or
a CommandBarComboBox, I don't use those controls myself.

I can repro #1 here, I do get an error sound when the ribbon is minimized
and -85 is entered as a font size. I'd consider that a bug, but I don't
really see that many users would enter a negative number for font size.

For #2 that also sounds like a bug, but if so there's not much you can do
about it. Let me see if I can interest someone from the ribbon team in these
problems.

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


<n777krish[ at ]gmail.com> wrote in message
news:1171515812.229333.267140[ at ]h3g2000cwc.googlegroups.com...
[Quoted Text]
> Hi Ken,
>
> I have got the Trial version of Office 2007 Enterprise Edition and I
> am still seeing some wierd issues.
>
> 1. The messages not showing issue seems to appear on one of Outlook's
> built-in control on my machine. Could you test the following:
>
>
> Compose a new e-mail. (Ensure that the Ribbon is maximized) Click in
> the body of the e-mail. Go to "Message" Tab > In the Font Size combo
> box Type in -85 and press enter. A message saying "The number must be
> between 1 and 1638." should be displayed.
>
> Now, Minimize the Ribbon and Carry out the same test. Go to Message
> Tab > Type in -85 and Press Enter. No message comes up on my machine,
> the ribbon just minimizes.
>
> Do you get the same results? What do I do about this?
>
> I also observe that the message box does not appear if I enter a new
> item into the combo box in my addin.
>
> 2. The second problem still exists:
> When I drag my Group onto the QuickAccess Toolbar.
> When the group is on the QAT I find that if the ribbon is minimized
> and I change the selection on the combobox on the QAT it does not get
> updated on the RibbonX when I Goto the message tab where mygroup is
> located. It updates ok the Ribbon is maximized.
>
> Also I observe the following:
> If the Ribbon is maximized but I have the Group on the QAT also, I
> make a change in the combobox on the QAT. I close the current
> inspector and open up another inspector. The Combobox on the ribbon
> comes out empty but the combobox on the QAT retains the last selected
> value.
>
> I am invalidating the combobox using the IRibbonUI object on Inspector
> activate. The invalidating does not seem to take effect on both of the
> comboboxes.
>
> My code structure is as follows:
> When the user selects an item from the drop down
> (cboProject_OnChange), a user property is added to the mailitem. This
> is saved in the e-mail. The GetText function returns the value in this
> property that is added to the item.
>
> I have a designer which Implements IRibbonExtensibility. All callbacks
> are defined in this designer.
>
> The following function returns the XML that I am using (with some
> unneccessary buttons removed):
>
> Public Function GetRibbonMailCompose() As String
>
> Dim sRibbonXML As String
>
> sRibbonXML = "<customUI xmlns=""http://schemas.microsoft.com/
> office/2006/01/customui"" onLoad=""Ribbon_OnLoad"" >" & _
> "<ribbon>" & _
> "<tabs>" & _
> "<tab idMso=""TabNewMailMessage"" >" & _
> "<group id=""QuickFile"" label=""QuickFile"">" & _
> "<comboBox id=""cboProject"" label=""Project""
> onChange=""cboProject_OnChange"" getText=""cboProject_GetText""
> getItemCount=""cboProject_GetItemCount""
> getItemLabel=""cboProject_GetItemLabel"" />" & _
> "<separator id=""s2""/>" & _
> "<comboBox id=""cboPrint"" label=""Print""
> onChange=""cboPrint_OnChange"" getText=""cboPrint_GetText""
> getItemCount=""cboPrint_GetItemCount""
> getItemLabel=""cboPrint_GetItemLabel"" />" & _
> "<button id=""cmdHelp"" onAction=""cmdHelp_Click""
> label=""&Help"" getSupertip=""cmdHelp_GetSupertip""
> imageMso=""Help"" />" & _
> "</group >" & _
> "</tab>" & _
> "</tabs>" & _
> "</ribbon>" & _
> "</customUI>"
>
> GetRibbonMailCompose = sRibbonXML
>
> End Function
>
> I am initializing a Global IRibbonUI object on the Ribbon_OnLoad
> callback which i use to invalidate the comboboxes.
>
> Ken, Do you have any sample code in VB6.0 or any addin with combo
> boxes on the ribbon written in VB6 that I could test on my machine
> possibly.
>
> Thank you for your help.
>
> Regards,
> Neil Goundar.
>

Re: Outlook 2007 Ribbon Minimized ComboBox OnChange
n777krish[ at ]gmail.com 2/15/2007 8:45:07 PM
Hello Ken,

Thanks for your help. I really appreciate it.

I have to clarify one point regarding what you wrote:
I can repro #1 ... but I don't really see that many users would enter
a negative number for font size.

The problem that I asked you to test was an illustration of what I am
observing in code that I have written. Because of this issue I am not
able to display any message when a users types in anything new in the
combobox. I need to be able to display a confirmation that this is
something new entered by a user then I will add it to a list that I
maintain but this message never comes up.

Thank you,
Neil Goundar.

On Feb 16, 3:27 am, "Ken Slovak - [MVP - Outlook]"
<kenslo...[ at ]mvps.org> wrote:
[Quoted Text]
> I'll play with your code later today or tomorrow and see what I can come up
> with. I have nocomboboxcode in VB 6, VB.NET or C# for either the ribbon or
> a CommandBarComboBox, I don't use those controls myself.
>
> I can repro #1 here, I do get an error sound when the ribbon is minimized
> and -85 is entered as a font size. I'd consider that a bug, but I don't
> really see that many users would enter a negative number for font size.
>
> For #2 that also sounds like a bug, but if so there's not much you can do
> about it. Let me see if I can interest someone from the ribbon team in these
> problems.
>
> --
> Ken Slovak
> [MVP - Outlook]http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm
>
> <n777kr...[ at ]gmail.com> wrote in message
>
> news:1171515812.229333.267140[ at ]h3g2000cwc.googlegroups.com...
>
>
>
> > Hi Ken,
>
> > I have got the Trial version of Office 2007 Enterprise Edition and I
> > am still seeing some wierd issues.
>
> > 1. The messages not showing issue seems to appear on one of Outlook's
> > built-in control on my machine. Could you test the following:
>
> > Compose a new e-mail. (Ensure that the Ribbon is maximized) Click in
> > the body of the e-mail. Go to "Message" Tab > In the Font Size combo
> > box Type in -85 and press enter. A message saying "The number must be
> > between 1 and 1638." should be displayed.
>
> > Now, Minimize the Ribbon and Carry out the same test. Go to Message
> > Tab > Type in -85 and Press Enter. No message comes up on my machine,
> > the ribbon just minimizes.
>
> > Do you get the same results? What do I do about this?
>
> > I also observe that the message box does not appear if I enter a new
> > item into the combo box in my addin.
>
> > 2. The second problem still exists:
> > When I drag my Group onto the QuickAccess Toolbar.
> > When the group is on the QAT I find that if the ribbon is minimized
> > and I change the selection on thecomboboxon the QAT it does not get
> > updated on the RibbonX when I Goto the message tab where mygroup is
> > located. It updates ok the Ribbon is maximized.
>
> > Also I observe the following:
> > If the Ribbon is maximized but I have the Group on the QAT also, I
> > make a change in thecomboboxon the QAT. I close the current
> > inspector and open up another inspector. TheComboboxon the ribbon
> > comes out empty but thecomboboxon the QAT retains the last selected
> > value.
>
> > I am invalidating thecomboboxusing the IRibbonUI object on Inspector
> > activate. The invalidating does not seem to take effect on both of the
> > comboboxes.
>
> > My code structure is as follows:
> > When the user selects an item from the drop down
> > (cboProject_OnChange), a user property is added to the mailitem. This
> > is saved in the e-mail. The GetText function returns the value in this
> > property that is added to the item.
>
> > I have a designer which Implements IRibbonExtensibility. All callbacks
> > are defined in this designer.
>
> > The following function returns the XML that I am using (with some
> > unneccessary buttons removed):
>
> > Public Function GetRibbonMailCompose() As String
>
> > Dim sRibbonXML As String
>
> > sRibbonXML = "<customUI xmlns=""http://schemas.microsoft.com/
> > office/2006/01/customui"" onLoad=""Ribbon_OnLoad"" >" & _
> > "<ribbon>" & _
> > "<tabs>" & _
> > "<tab idMso=""TabNewMailMessage"" >" & _
> > "<group id=""QuickFile"" label=""QuickFile"">" & _
> > "<comboBoxid=""cboProject"" label=""Project""
> > onChange=""cboProject_OnChange"" getText=""cboProject_GetText""
> > getItemCount=""cboProject_GetItemCount""
> > getItemLabel=""cboProject_GetItemLabel"" />" & _
> > "<separator id=""s2""/>" & _
> > "<comboBoxid=""cboPrint"" label=""Print""
> > onChange=""cboPrint_OnChange"" getText=""cboPrint_GetText""
> > getItemCount=""cboPrint_GetItemCount""
> > getItemLabel=""cboPrint_GetItemLabel"" />" & _
> > "<button id=""cmdHelp"" onAction=""cmdHelp_Click""
> > label=""&Help"" getSupertip=""cmdHelp_GetSupertip""
> > imageMso=""Help"" />" & _
> > "</group >" & _
> > "</tab>" & _
> > "</tabs>" & _
> > "</ribbon>" & _
> > "</customUI>"
>
> > GetRibbonMailCompose = sRibbonXML
>
> > End Function
>
> > I am initializing a Global IRibbonUI object on the Ribbon_OnLoad
> > callback which i use to invalidate the comboboxes.
>
> > Ken, Do you have any sample code in VB6.0 or any addin with combo
> > boxes on the ribbon written in VB6 that I could test on my machine
> > possibly.
>
> > Thank you for your help.
>
> > Regards,
> >NeilGoundar.- Hide quoted text -
>
> - Show quoted text -


Re: Outlook 2007 Ribbon Minimized ComboBox OnChange
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 2/15/2007 9:23:14 PM
The only suggestion I can think of for that problem is a real hack. It would
be to get the hWnd of the Outlook Inspector window and place a modal dialog
window on top of that, using Win32 API calls. I think the problem is that
the parent of your message box is the ribbon frame and not the actual
Inspector window.

That could be checked and verified with some detective work using Spy++ to
see what windows are open in a window with a caption of "rctrl_renwnd32" and
see if your message box is shown in Spy++ and what window is its parent
window.

Unfortunately there will be bugs in the ribbon, some of which we know
already and some just waiting for discovery. When and if MS fixes them is
another question. However, if you have to support Outlook 2007 RTM then
there's not much you can do except try to find workarounds or come up with a
different UI design.

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


<n777krish[ at ]gmail.com> wrote in message
news:1171572307.742660.274410[ at ]l53g2000cwa.googlegroups.com...
[Quoted Text]
> Hello Ken,
>
> Thanks for your help. I really appreciate it.
>
> I have to clarify one point regarding what you wrote:
> I can repro #1 ... but I don't really see that many users would enter
> a negative number for font size.
>
> The problem that I asked you to test was an illustration of what I am
> observing in code that I have written. Because of this issue I am not
> able to display any message when a users types in anything new in the
> combobox. I need to be able to display a confirmation that this is
> something new entered by a user then I will add it to a list that I
> maintain but this message never comes up.
>
> Thank you,
> Neil Goundar.

Re: Outlook 2007 Ribbon Minimized ComboBox OnChange
n777krish[ at ]gmail.com 2/16/2007 12:43:52 AM
Unfortunately that also does not work.

I had already tested using Windows API and trying to display a modal
dialog in front of the Outlook inspector. I get the handle to the
ForegroundWindow and try to display a dialog with same results as with
displaying Message boxes.

Even tried to display a modal form from the combobox click and it does
not get displayed.

But everything works if it comes from a Button instead of the
ComboBox. I will try SPY++ and do some detective work with that :-).

Thanks for all your help. I guess in the worst case I can note this as
a known issue in our add-ins and advice customers to use it with
Ribbon maximized.

Regards,
Neil Goundar.

On Feb 16, 9:23 am, "Ken Slovak - [MVP - Outlook]"
<kenslo...[ at ]mvps.org> wrote:
[Quoted Text]
> The only suggestion I can think of for that problem is a real hack. It would
> be to get the hWnd of the Outlook Inspector window and place a modal dialog
> window on top of that, using Win32 API calls. I think the problem is that
> the parent of your message box is the ribbon frame and not the actual
> Inspector window.
>
> That could be checked and verified with some detective work using Spy++ to
> see what windows are open in a window with a caption of "rctrl_renwnd32" and
> see if your message box is shown in Spy++ and what window is its parent
> window.
>
> Unfortunately there will be bugs in the ribbon, some of which we know
> already and some just waiting for discovery. When and if MS fixes them is
> another question. However, if you have to support Outlook 2007 RTM then
> there's not much you can do except try to find workarounds or come up with a
> different UI design.
>
> --
> Ken Slovak
> [MVP - Outlook]http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Optionshttp://www.slovaktech.com/products.htm
>
> <n777kr...[ at ]gmail.com> wrote in message
>
> news:1171572307.742660.274410[ at ]l53g2000cwa.googlegroups.com...
>
>
>
> > Hello Ken,
>
> > Thanks for your help. I really appreciate it.
>
> > I have to clarify one point regarding what you wrote:
> > I can repro #1 ... but I don't really see that many users would enter
> > a negative number for font size.
>
> > The problem that I asked you to test was an illustration of what I am
> > observing in code that I have written. Because of this issue I am not
> > able to display any message when a users types in anything new in the
> >combobox. I need to be able to display a confirmation that this is
> > something new entered by a user then I will add it to a list that I
> > maintain but this message never comes up.
>
> > Thank you,
> >NeilGoundar.- Hide quoted text -
>
> - Show quoted text -


Re: Outlook 2007 Ribbon Minimized ComboBox OnChange
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 2/16/2007 2:19:18 PM
ForegroundWindow may not be the correct window handle to use. I'd check in
Spy++ to see what's what. You want to look for a window with a class of
"rctrl_renwnd32" and a caption that matches the caption your Inspector has
in the first Inspector.Activate event. I usually use FindWindow myself.

According to a contact on the ribbon team at MS the first problem with the
message boxes is a known bug. In his words "the error messagebox gets eaten
as the minimized ribbon closes".

He was not able to repro the second issue with his own comboboxes.

He said that as long as the onChange callback caches the value entered by
the user, and getText returns that value, the combo's are always in sync.
The control referenced in the onChange and getText callbacks should always
refer to the same value to ensure the combo's are in sync.

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


<n777krish[ at ]gmail.com> wrote in message
news:1171586631.999230.8920[ at ]j27g2000cwj.googlegroups.com...
[Quoted Text]
> Unfortunately that also does not work.
>
> I had already tested using Windows API and trying to display a modal
> dialog in front of the Outlook inspector. I get the handle to the
> ForegroundWindow and try to display a dialog with same results as with
> displaying Message boxes.
>
> Even tried to display a modal form from the combobox click and it does
> not get displayed.
>
> But everything works if it comes from a Button instead of the
> ComboBox. I will try SPY++ and do some detective work with that :-).
>
> Thanks for all your help. I guess in the worst case I can note this as
> a known issue in our add-ins and advice customers to use it with
> Ribbon maximized.
>
> Regards,
> Neil Goundar.

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net