New
#1
How to create a notepad contains values by default...?
When creating a new text document thru,
Right click > new > Text document
should contain some data by default.. Please Help me create it.
When creating a new text document thru,
Right click > new > Text document
should contain some data by default.. Please Help me create it.
Welcome to the Forums.
If you make a text file named Template.txt in the folder C:\Windows\ShellNew whatever is in that file will be included in new text files created as you describe.
Mine has one line:
This is a text file template.
just for testing.
I just tried creating Template.txt in C:\Windows\ShellNew.
Then right clicked on the Desktop and selected New, Text Document.
Nothing from Template.txt was in the new Text document when opened with Notepad.
Tried it on Windows 7 and Windows 8.1.
Also, found this which may do what is wanted?????
How To Add an Object to the New Object List
I forgot this part. For this key
HKEY_CLASSES_ROOT\.txt\ShellNew
Filename value of type REG_SZ should be
Template.txt
Edit: I guess using the filename "Template.ext" is only a convention. It doesn't trigger the entry. Whatever filename you use must be specified per extension in HKCR.
Edit2: That's what happens when I try to take a shortcut. Thought I knew that one so I didn't search. :)
That is cool, works like a charm.
Thanks for taking the time to explain it.
REG_SZ was the key.
I should have gotten it right the first time but because the file name used was "template" I somehow got the idea that file in that folder did it all. The memory isn't as good these days. :) Glad it's working. :)