HTML associated with Word in Context Menu (Edit option)


  1. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
       #1

    HTML associated with Word in Context Menu (Edit option)


    I'm sure someone has asked this before, but a brief search didn't seem to have a thread that looked helpful.

    Today I clicked "Edit" in the context menu for a HTML file, just to check some code I'd written.
    I expected Notepad to open, but Word opened instead.

    I had a brief look at the Registry entries (HKEY_CLASSES_ROOT\.html) but I couldn't determine why Word was opening.
    Click picture for animation
    HTML associated with Word in Context Menu (Edit option)-file-association-edit-html-files-.gif
    I would prefer that Notepad open, if I choose "Edit" in the context menu for a HTML file.

    Does anyone know:

    • Which thread/tutorial I should check?
    • The Registry hack required to accomplish the change I want?

    Note:
    Notepad would only be used for "viewing" html files.
    I use Notepad++ for actual html, css, js and php editing.

    I often click "Edit" instead of "Edit with Notepad++".
      My Computer


  2. Posts : 72,512
    64-bit Windows 11 Pro for Workstations
       #2

    Hello Peter,

    If you like, using the tutorial below to download and merge the .reg file for the listed html option will restore it's default associations to also have Edit open with Notepad again. You'll need to set Open with to use what program your wanted other than the default Internet Explorer again afterwards though.

    Default File Type Associations - Restore

    Hope this helps. :)
      My Computer


  3. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
    Thread Starter
       #3

    Thanks Brink


    Brink said:
    Hello Peter,

    If you like, using the tutorial below to download and merge the .reg file for the listed html option will restore it's default associations to also have Edit open with Notepad again. You'll need to set Open with to use what program your wanted other than the default Internet Explorer again afterwards though.

    Default File Type Associations - Restore

    Hope this helps. :)
    I guess that would be the simplest way.
    I was hoping that I could do it without doing a restore default association.

    I was thinking that if I did a manual Registry hack, I could store the procedure in my files and use it as a "template" in the future for other file types.

    Sorry, I'm not allowed to Rep you.
      My Computer


  4. Posts : 72,512
    64-bit Windows 11 Pro for Workstations
       #4

    No worries. :)

    By deault, all text file types like these (html, cmd, bat, vbs, etc...) will edit with notepad.

    Here's the basics though:

    While in regedit, go the HKCR key for the text editable file extension (ex: html) to see what it's (Default) value is set for (ex: htmlfile).

    HTML associated with Word in Context Menu (Edit option)-html.jpg

    You would then scroll down to it (ex: htmlfile) in HKCR past the other file extensions. Expand the sat htmlfile until you get to it's Shell -> Edit -> command subkey like below. In the command subkey, you could set it's (Default) value to use the full path of .exe file within quotes of the program you wanted to edit with instead.

    Example:

    For default = notepad.exe %1

    For example program = "C:\Program Files\Example\program.exe" %1


    HTML associated with Word in Context Menu (Edit option)-htmlfile.jpg
      My Computer


  5. Posts : 4,049
    W7 Ultimate SP1, LM19.2 MATE, W10 Home 1703, W10 Pro 1703 VM, #All 64 bit
    Thread Starter
       #5

    Perfect


    Thanks Brink.


    I thought that it was a simple hack.
    I remember that I did something similar with XP, but I couldn't remember the details.
      My Computer


  6. Posts : 72,512
    64-bit Windows 11 Pro for Workstations
       #6

    You're most welcome Peter. :)
      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 20:56.
Find Us