VB Code:
Private Sub SetNotepadFont(sFontName As String)
Dim oShell As Object
Set oShell = CreateObject("WScript.Shell")
oShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Notepad\lfFaceName", sFontName
Set oShell = Nothing
End Sub
Then you could call the function like this:
VB Code:
' These are all "Fixed-Width" fonts, like you want
SetNotepadFont "Courier" ' - OR -
SetNotepadFont "Courier New" ' - OR -
SetNotepadFont "Lucida Console" ' (<- This is Notepad's default) - OR -
SetNotepadFont "FixedSys"