CodeItBetter Programming Another VB Programming Blog

How to Open Text File with Notepad

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
'File/Folder Handling - How to Open Text File with Notepad
Sub Main()
'By specifing the file name
    Shell "Notepad.exe C:\Temp\Test.txt", vbMaximizedFocus
'By specifing the variable name which contains the file name
    Shell "Notepad.exe" & " " & MyFinalPathFile, vbMaximizedFocus
'By specifiing the file name which has space on that.
    Shell "Notepad.exe " & """C:\Program Files\Test.txt""", vbMaximizedFocus
End Sub
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.