Ribbon.get_uibutton return None in doc-opened hook

Hi,
I want to change the icon of a certain button depending on the model,
My problem is that ribbon.get_uibutton returns None when called inside a doc-opened file.
Is there a way around this?