03
Sep 2008
10 Comments
Taming Microsoft Word 2007’s File Associations and Document Windows, Part Two

Sunday, I blogged about how I had dinner with Paul Thurrott and one of the topics on the table was how Microsoft Word affects window z-order. If you haven’t read it, I suggest you do… otherwise you’ll be lost.

Due to the way Word was designed, there doesn’t appear to be an easy solution to preserve the use of the DDE command and keep window z-order intact (on our end). In Connect lingo, this would have probably been marked WILLNOTFIX. Thankfully, we can tweak the registry a bit to alter the open behavior, therefore making Paul Thurrott happy.

Here is some very important information I’m required to inform you about:

  • Each document opened will now spawn a new winword.exe process.
  • Changing behavior for other actions (e.g. print) is out of this guide’s scope
  • Changing behavior for other applications (e.g. Powerpoint, Excel) is out of this guide’s scope.
  • Backing up the registry, undoing the changes, or other otherwise covering your ass is out of this guide’s scope.

Okay, let’s dig in! First, let’s brush up on some registry terminology with a cleverly produced picture.

That committed to non-pageable memory, let’s continue by altering the open behavior for legacy documents (.doc files)…

  1. With an elevated registry editor, navigate to HKEY_CLASSES_ROOTWord.Document.8shellOpen key.
  2. Rename the ddeexec sub-key to ddeexec.disabled.
  3. Navigate to the HKEY_CLASSES_ROOTWord.Document.8shellOpencommand key and rename the command value to command.disabled. Do not confuse the command value with the command key!
  4. Double-click the (Default) value and append "%1" (including quotes) to the end of the data string.
  5. Verify that legacy documents open in a new process upon every invocation.

… and now lets alter the open behavior for new documents (.docx files) …

  1. With an elevated registry editor, navigate to HKEY_CLASSES_ROOTWord.Document.12shellOpen key.
  2. Rename the ddeexec sub-key to ddeexec.disabled.
  3. Navigate to the HKEY_CLASSES_ROOTWord.Document.12shellOpencommand key and rename the command value to command.disabled. Do not confuse the command value with the command key!
  4. Double-click the (Default) value and append "%1" (including quotes) to the end of the data string.
  5. Verify that new documents open in a new process upon every invocation.

Okay, what did we just do? We simply disabled the DDE-related keys (just in case you need to restore them) and altered the launch command to include the document, you double-click, as a command line parameter, since the DDE FileOpen command will no longer be sent. Easy!

For those looking to automate this process, say for an entire enterprise-wide deployment, cough, you can use my PowerShell script. Just paste it into the PowerShell window and pray you don’t see red.

  • Pingback: Taming Microsoft Word 2007’s File Associations and Document Windows, Part One - Within Windows

  • http://ie7pro.com surilamin

    MS should really hire you…

  • desu

    man that was annoying, and the video speed didn’t help.

  • Scott

    You have just saved me from so much annoyance!

  • Zach

    Thanks, looking for this solution for a long time now……So much for Micro$oft doing anything about it.

  • You da bomb

    I have wanted to do this for such a long time…

  • Pingback: Word 2007 File Association | Select Networking

  • Jesus (not the saviour)

    Amazing!!!
    Thank you very much!

  • redskier44

    This worked for me, but then caused a problem with trying to close Word. the default template, normal.dotm, became an issue for any open word documents subsequent to the first document opened such that when the document was closed, Word would try to save the default template but it would pop up a series of dialogs saying the template was read only (hard to describe). Might be some other problem manifesting.

    So close, but not quite. I appreciate the info however.

  • ynotravid

    Bypassing DDE will break some functionality. As you noted before DDE is still used for much of Windows’s internal communication. Not trying to rain just thought I should mention it.