Hi
You can create a simple batch file using Open, Print and Close Commands
Code:
Open "c:\temp.bat" for output as 1
Print #1, Echo Off
Close #1
will create a batch file
You can execute the batch file from Excel VBA using Shell command.
On the other hand, you can also open the Notepad through shell directly
Code:
Shell "NOTEPAD.exe",vbNormalFocus
To run the macro automatically use Excel's events like Workbook_Open etc
Cheers
Shasur