Well .. you can change the file extension here :
Code: VB
.
.
    If Right(MyFile.Path,4) = ".txt" And Left(MyFile.Name,Len(Prefix)) = Prefix Then
.
.

[[ You were not very clear about the requirements of your program, so I am assuming you need view html files in notepad. ]]

So, your code would look like :
Code: VB
Dim objFSO
Dim MyFile
Dim MyFolder
Dim objShell
Dim Prefix

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set MyFolder = objFSO.GetFolder("D:\Test")
Set objShell = WScript.CreateObject("WScript.Shell")

Prefix = InputBox("(*) Enter prefix for file-names (e.g. for opening 0310*.html or 0310*.htm files, enter 0310) :"+vbcrlf+vbcrlf+"(*) Leaving this blank or, clicking cancel will open *.html or *.htm files ...", "File-Name Prefix")
For Each MyFile In MyFolder.Files
    If (Right(MyFile.Path,4) = ".htm" Or Right(MyFile.Path,5) = ".html") And Left(MyFile.Name,Len(Prefix)) = Prefix Then
        objShell.Run("notepad " + MyFile.Path)
    End If
Next

If you need anything more, feel free to tell

Offtopic comment:
Yeah, about the reward : a simple "Thank you" is enough for me
topsy99 like this