A user asked a question in Experts Exchange asking if it was possible to use a dynamicMenu in the officeMenu. The answer is that yes, you can, but this person couldn't get it to work.
The issue appears to be with the following code:
[xml]
Specifically, it was the size attribute causing the issue. If this same code were used in a tab, it wouldn't be an issue. The officeMenu, however, will not let you control the size.
This isn't the first time I've run into something like this. It's in this kind of situation where the CustomUI editor is key to solving issues. By taking your XML code and validating it in the CustomUI editor, you can identify these issues immediately.