How to create a notepad contains values by default...?


  1. Posts : 1
    Windows 7
       #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.
      My Computer


  2. Posts : 5,092
    Windows 7 32 bit
       #2

    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.
      My Computer


  3. Posts : 6,285
    Windows 10 Pro X64
       #3

    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.
      My Computer


  4. Posts : 6,285
    Windows 10 Pro X64
       #4

    Also, found this which may do what is wanted?????

    How To Add an Object to the New Object List
      My Computer


  5. Posts : 5,092
    Windows 7 32 bit
       #5

    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. :)
      My Computer


  6. Posts : 6,285
    Windows 10 Pro X64
       #6

    Can you put it all together in one post? I'm still confused?
    Can a "template" for a text (.txt) file be created this way as .txt already had an entry.

    How to create a notepad contains values by default...?-shellnew-txt.jpg
      My Computer


  7. Posts : 5,092
    Windows 7 32 bit
       #7

    Ztruker said:
    Can you put it all together in one post? I'm still confused?
    Can a "template" for a text (.txt) file be created this way as .txt already had an entry.

    How to create a notepad contains values by default...?-shellnew-txt.jpg
    Add the value
    FileName

    like this

    How to create a notepad contains values by default...?-capture.png

    Edit: Then all you need to do is create the file
    C:\Windows\ShellNew\Template.txt

    and type in whatever boilerplate text you want.
      My Computer


  8. Posts : 6,285
    Windows 10 Pro X64
       #8

    That is cool, works like a charm.

    Thanks for taking the time to explain it.

    REG_SZ was the key.
      My Computer


  9. Posts : 5,092
    Windows 7 32 bit
       #9

    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. :)
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:55.
Find Us