Creating macros
Creating a macro allows you to automate and repeat tasks.
Note: Not all functionality can be recorded using macros.
Select
(Tools tab > Automation panel > Record Macro).
The functionality you use will be recorded from now until you stop the macro recording.
Complete the tasks that you want to perform.
Select
(Tools tab > Automation panel > Stop Recording).
The Save Macro dialog appears.
Enter a name for the macro in the file name box and select Save.
Your new script is saved with a (*.py) filename extension, and can now be used as a Python script.