BeginGroup

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know how to have a BeginGroup "line" occur AFTER a newly created
button on a toolbar?

So let's say I use a toolbar in Outlook, say "Standard". I add a new button
using VB.net 2005 VSTO to the BEGINNING of the Standard toolbar. I now want
the BeginGroup to occur right after this new button.

Unfortunately, this does not work:
....
_cbb = myToolBar.Controls.Add(Type:=Office.MsoControlType.msoControlButton,
Before:=1, Temporary:=True)

With _cbb
.Style = MsoButtonStyle.msoButtonIconAndCaption
.Caption = "Foo"
.TooltipText = "Foo"
.FaceId = 65
.BeginGroup = True
End With
.....

Thank you
 
You would have to find the control following yours and set BeginGroup on
that control, not your own.

In addition, you have no guarantee that some other code isn't going to add
another button before or after yours and mess up the grouping you want.
 
Back
Top