Author

Topic: Close (Read 579 times)

member
Activity: 62
Merit: 10
August 04, 2013, 06:17:28 AM
#4
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.
hero member
Activity: 927
Merit: 1000
฿itcoin ฿itcoin ฿itcoin
August 04, 2013, 05:50:29 AM
#3
Look into the shell command, maybe this will help you get started
Code:
Sub Calc1()
Dim RetVal
RetVal = Shell("%windir%\system32\calc.exe ", 1)
ShowStatus "Open Calculator"
End Sub


Good luck, have fun
b!z
legendary
Activity: 1582
Merit: 1010
August 04, 2013, 05:32:15 AM
#1
Thanks for the help guys.
Jump to: