open + resize notepad.exe from VBA?

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top