-
I've tried to open the text file with notepad with the
following command
ShellExecute(Me.hwnd, "open", "c:\temp\readme.txt", 0&, 0&, SW_SHOWNORMAL)
but it wouldn't do anything, I'm pretty sure in the register, the txt file is associated with notepad
Any idea?
Thank you in advance for any help!!
-
Shell "Notepad c:\MyFile.txt", vbNormalFocus
-
Code:
Shell "Notepad.exe C:\mytxt.txt", vbNormalFocus
Not only can you read text files..but you can read the inside of a bat, com, exe, or any other file as well.