Hi Thierry,
It is not supported to use the RibbonMenuItem object in the GetItemByTag function in RibbonBar controls.
You can refer to the following link.
https://docs.appeon.com/appeon_online_help/pb2019r2/powerscript_reference/ch10s269.html
But I will record it as a new enhancement / requirement request and will transfer it to our product team for consideration.
BTW, you can work it around via the following code example:
String ls_menuTag, ls_text, ls_tag
Integer li_Return
Long ll_i
RibbonMenuItem lr_MenuItem
RibbonMenu lr_menu
RibbonLargeButtonItem lr_LargeButton
li_Return = rbb_1.GetItemByTag ("LargeButtonTag", lr_LargeButton)
li_Return = rbb_1.getmenubybuttonhandle( lr_LargeButton.itemhandle , lr_menu)
If lr_menu.getitemcount( ) > 0 Then
For ll_i = 1 To lr_menu.getitemcount( )
lr_menu.getitem( ll_i, lr_MenuItem)
ls_text = lr_MenuItem.text
ls_tag = lr_MenuItem.tag
Next
End If
Regards,