Page 1 of 1

Don't ask to save empty file, if started with an empty file.

Posted: Sun Nov 14, 2004 12:35 am
by pmaia
I commonly used Notepad (and now, happily, TextPad) to filter off formatting from cut/paste text in Word, Outlook, IE, etc... Example: I want to paste something into a Word Doc or Outlook email, from the Web, Word or Outlook, but I want the formatting gone. So I bring up TextPad, paste it in, then highlight all, cut all and then exit. I do this probably 20-30 times a day in my job. It would be nice if, when I start with an empty doc, and try to exit with an empty doc, that it not prompt me to save the file. I previously had an editor that would do this, but it wasn't TextPad.

Paul Maia
Happy TextPad User!

Posted: Tue Nov 16, 2004 2:31 pm
by bveldkamp
I don't know about Outlook, but in Word you can do "Paste as unformatted text". I usually do Alt+E, S, <arrow up>, <enter>, but I guess one could write a macro that does the same even faster.

<tries>

Yes, here it is:

Code: Select all

Selection.PasteSpecial Link:=False, DataType:=wdPasteText
If you insist on using TP, just record a macro that does:
- Paste
- Select All
- Copy
- Undo
This leaves the document "unchanged" and you can close TP without asking questions.

<edit>
Just tried this, but it seems you can't record the Undo function... You could save to a temporary file though, macro becomes:
- Paste
- Select All
- Copy
- Save as C:\temp\scrap.txt

However, this will leave you with a temporary file on disk, which you may or may not care about.

Posted: Wed Nov 17, 2004 7:45 am
by Thomas Schremser
bveldkamp wrote: Just tried this, but it seems you can't record the Undo function... You could save to a temporary file though, macro becomes:
- Paste
- Select All
- Copy
- Save as C:\temp\scrap.txt

However, this will leave you with a temporary file on disk, which you may or may not care about.
You could avoid the temporary file if you just use Edit|Mark Clean (Ctrl+Alt+S) instead of saving.