1. Go to Macros menu -> Customize
2. Choose a macro from My Macros listbox.
3. Activate Events button by setting Run as Events checkbox.
4. Click Events button then choose File Opened event from Selected Events listbox. Click OK.
Also there is the 32-bit naoExecMacroOnEvent plug-in.
The home page and the plug-in’s dialogs are fully in japanese, but
I have no much trouble to configure the plug-in because its dialogs are simple enough.