How to auto execute a macro when opening a Powerpoint presentation?
问题 I have a pretty basic question, but could not find the answer on internet. In Powerpoint 2010, I have a macro that I would like to be executed everytime the Powerpoint document is opened. How to achieve this ? Thanks ! 回答1: Try to write this function. Sub Auto_Open() MsgBox("welcome") End Sub Replace the msgbox in your code. 回答2: While Auto_Open doesn't run in a PowerPoint presentation, you can fake it. Add a CustomUI part to the presentation, then use the CustomUI OnLoad callback to run code