Tools - Macro - Application Events - Autorun

Ribbon bar. Select the Tools tab. In the Tools group, click Macro and from the ApplicationEvents submenu, select Autorun to save your application-level event code with a specific type of document so that it runs any time that type of document is opened.

Classic menus. From the Tools - Macro - Application Events submenu, select Autorun to save your application-level event code with a specific type of document so that it runs any time that type of document is opened.

Note that your code must first be run/saved before this command is applicable.