Redundancy is important! So, use DocumetOpen() and AutoOpen() when you write your Macros.
https://docs.microsoft.com/en-us/office/vba/api/word.document.openarrow-up-right
https://docs.microsoft.com/en-us/office/vba/word/concepts/customizing-word/auto-macrosarrow-up-right
You can use Workbook_Open() if you want to execute anything when Excel starts.
If you write an Excel Macro absolutely use the Auto_Open() function to catch macro execution in the beginning.
Use .docm or .doc extension. New .docx extension doesn't store macros.
Last updated 5 years ago