open + resize notepad.exe from VBA?

  • Thread starter Thread starter Mad Scientist Jr
  • Start date Start date
M

Mad Scientist Jr

I'm writing a macro that would open a text file in notepad.exe and
resize the window to a certain x/y pixel size.

I can open the file in notepad, but how would you resize the window?

'Open MyFile in Notepad
Dim MyShell As Object
Set MyShell = CreateObject("WScript.Shell")
Dim MyFile as String
MyFile = "C:\Temp\File1.txt"
MyShell.Run Chr(34) & "C:\Windows\Notepad.exe " & Chr(34) & MyFile
 
Back
Top