A
avkokin
Hello.
I have own menu as msoControlPopup with list some values (e.g.
bookmarks). Above this list I want to add other the item menu (e.g.
"Remove all bookmarks"). And I want to separate it from the list of
bookmarks. The list of bookmarks is lower than menu item "Remove all
bookmarks". I can to add the separator for menu item "Remove all
bookmarks". But it not showed.
If I add the separator for list of bookmarks then I get many
separators between each menu item.
Question: how can I add the separator for my top menu item?
Thank you very much. Below - code:
Set cbbRmv = cb.Controls.Add(msoControlPopup)
With cbbRmv
.Caption = "Remove bookmarks"
Set cbbAllDelBM = cbbRmv.Controls.Add(msoControlButton)
If ActiveDocument.Bookmarks.Count = 0 Then
cbbAllDelBM.Enabled = False
End If
With cbbAllDelBM
' .BeginGroup = True ' HERE NOT SHOWED !!!
.Caption = "Remove all bookmarks"
.OnAction = "delAllBM"
.FaceId = 1985
End With
'remove particular bookmarks
If ActiveDocument.Bookmarks.Count > 0 Then
For Each bm In ActiveDocument.Bookmarks
Set cbbDelBM = cbbRmv.Controls.Add(msoControlButton)
With cbbDelBM
.Caption = bm.Name
.Style = msoButtonCaption
.OnAction = "delBM"
.BeginGroup = True ' IT SHOW SEPARATOR BETWEEN
BOOKMARK !!!
End With
Next bm
End If
End With
I have own menu as msoControlPopup with list some values (e.g.
bookmarks). Above this list I want to add other the item menu (e.g.
"Remove all bookmarks"). And I want to separate it from the list of
bookmarks. The list of bookmarks is lower than menu item "Remove all
bookmarks". I can to add the separator for menu item "Remove all
bookmarks". But it not showed.
If I add the separator for list of bookmarks then I get many
separators between each menu item.
Question: how can I add the separator for my top menu item?
Thank you very much. Below - code:
Set cbbRmv = cb.Controls.Add(msoControlPopup)
With cbbRmv
.Caption = "Remove bookmarks"
Set cbbAllDelBM = cbbRmv.Controls.Add(msoControlButton)
If ActiveDocument.Bookmarks.Count = 0 Then
cbbAllDelBM.Enabled = False
End If
With cbbAllDelBM
' .BeginGroup = True ' HERE NOT SHOWED !!!
.Caption = "Remove all bookmarks"
.OnAction = "delAllBM"
.FaceId = 1985
End With
'remove particular bookmarks
If ActiveDocument.Bookmarks.Count > 0 Then
For Each bm In ActiveDocument.Bookmarks
Set cbbDelBM = cbbRmv.Controls.Add(msoControlButton)
With cbbDelBM
.Caption = bm.Name
.Style = msoButtonCaption
.OnAction = "delBM"
.BeginGroup = True ' IT SHOW SEPARATOR BETWEEN
BOOKMARK !!!
End With
Next bm
End If
End With