Repeat a loop until right click is not showing a contextual menu

Hi all
In word mac there is no way to delete the recents except right clickin on the name
Select remove from recent
Repeat procedure with next name which will be in the same spot in the screen

this must be repeated until the right click does not show a context menu