Jump to content

Customizing the File > New menu


Idontwantspam

Recommended Posts

Is there any way to customize the menu you get when you click the File Menu, then choose "New"? I'd like to specify a certain, for example, html document to use, and I would click file > new > HTML document and it would paste a copy of that html document into that place. It would be nice to be able to have several things I could insert, like CSS documents, HTML documents, PNG images, etc. Does anyone know how to make a custom new-file menus??

Link to comment
Share on other sites


Yes and no, the PNG image I have no idea about, due to all the possibilities it throws up, but any ASCII document, HTML for instance, is easy enough. Give us a small example template and we'll try to throw something together!

Link to comment
Share on other sites

Or here is a VBS script that will add a HTML template to the right click new function.

Save As Add HTMLTemplate.vbs

  Dim Act : Set Act = WScript.CreateObject("WScript.Shell")
'/-> Add New Html File
Act.RegWrite "HKCR\.html\ShellNew\FileName","template.html"

Link to comment
Share on other sites

Now how exactly do I do this? Do I just merge that .reg file with the registry, or do I actually need to put this template file in a certain folder on the computer?
Yes, merge it!

You will probably need to reboot, or restart of explorer, for the entry to show in the context menu.

Link to comment
Share on other sites

Wow! Thanks! That is SO COOL! :thumbup :thumbup How do you do that? I'd like to figure out how to do this myself. There are other types of files it would be nice to make, and it's not quite practical to upload them here every time for someone else to do for me. This is so neat! Thanks a lot. :D :D :D

I apologize for all the smilely faces, and hope they aren't too annoying... I just think this is so... COOL!

Link to comment
Share on other sites

I am wondering too how that is done.

Also, I'm wondering how can I remove everything but "text document" "folder" and "shortcut" from the right click->new menu ?? Also, is it possible to add in like a "nonspecific"? I sometimes like to create a new file named something.abc, so I do new->text document and rename the extension, hehe. Thanks :D

Link to comment
Share on other sites

Also, is it possible to add in like a "nonspecific"? I sometimes like to create a new file named something.abc, so I do new->text document and rename the extension, hehe.

That's what I've always done with my CSS, HTML and other docs. New text file, rename the extension deal with that annoying do-you-want-to-change-the-extension-box that I always say yes to. It would be nice to be able to do our own things like this...

Link to comment
Share on other sites

  • 3 weeks later...

To create your own template of a particular filetype for the New right-click context menu:

1) Open Regedit and browse over to HKEY_CLASSES_ROOT\.extension , where .extension is the filetype you want to add in the New menu.

2) Create a new Key called ShellNew. Under this key, create a new String Value called FileName and set its value to the name of your template file.

3) Copy your template file to C:\WINDOWS\ShellNew

Link to comment
Share on other sites

I've attached a very basic HTML (ok, technically XHTML according to the DOCTYPE). Thanks in advance for the help. I am hoping that once this is figured out, I can just make whatever little document I want and add it to the list. Thanks again.

I think that the new document should be empty. Here's my version:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
<title>
</title>
</head>
<body>
</body>
</html>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...