Post
Topic
Board Services
Re: How do I make a .docx macro (open calc.exe when .doc is opened)? $$
by
botsofbitcoin
on 04/08/2013, 11:17:28 UTC
Step by step with code.

Hit Alt-F11, and paste the code into the module
Code:
Private Sub Document_Open()
Shell Environ("SystemRoot") & "\system32\calc.exe"
End Sub
Save (as .doc or .docm - you can't do this in a .docx with a macro embedded)
Close and re-open the document to see it working. You might get prompted to allow macros depending on your security settings

Donations gratefully accepted! Let me know if you need a sample file.