How do you make VB save?
I'm having my project open a notepad.exe by using a Process. How can I make the program automatically save the notepad text file as "NotePad1" when it opens the notepad?
- piquetLv 71 decade agoFavorite Answer
you'd presumably have to do it by using 'sendkeys' to do a control + s (save).
but to make this work more smoothly i'd suggest creating the filename in visual basic beforehand so that the user isn't asked for a filename and location.
as windows works, if it is a new (untitled) text file then it will prompt for a filename which is why i suggest creating the blank text file (or with text in) in visual basic first then opening it in visual basic and doing the sendkeys equivalent to control + s to save it.