Word & Excel - There was a problem sending the command to the program
I fixed the problem with message "There was a problem sending the command to the program" in Word.
I encountered the problem that Word would issue the message "There was a problem sending the command to the program" at every attempt to open a .docx file.
The problem was not related to the file or its content. I could stop the message by changing the name of the file to end .doc without changing the format of the file content.
I searched for and found many suggested fixes for the problem ... and none of the fixes worked for me. I eventually fixed the message "There was a problem sending the command to the program" with a change in the registry. I edited "HKEY_CLASSES_ROOT\Word.Document.12\shell\Open " and deleted the "ddeexec" key. The "ddeexec" key can also be deleted from "HKEY_CLASSES_ROOT\Word.DocumentMacroEnabled.12\shell\Open".
The "Word.Document.12" values are from Word 2007. It is likely that the "ddeexec" fix that is described here will work for Word 2007, Word 2010 and Word 2013.
You can change the registry, for Word 2007, Word 2010 and Word 2013 by right-clicking and saving this file ...
Double-click the file after downloading to update the registry. WARNING ... It is you that knows the situation of your own computer. I cannot know about your computer and cannot be responsible for any unintended consequences. See Backup and Restore below. I have tested this process with Word 2013 and I am confident that it is safe.
An earlier version of this page linked to an Excel support page at Microsoft and that page now appears to be unavailable. This page and the link have been updated.
My research and tests suggest that a similar fix may work in some cases where Excel issues the message "There was a problem sending the command to the program" when attempting to open files.
In the Excel menu, I can click File --> Options --> Advanced and then scroll down to General and tick on "Ignore other applications that use Dynamic Data Exchange (DDE)" (and then click OK). I can then double click an Excel spreadsheet in Windows Explorer and Excel will display the message "There was a problem sending the command to the program". The "problem" message stops appearing after I tick off "Ignore other applications that use Dynamic Data Exchange (DDE)".
The error message may still be seen after ticking off "Ignore other application ..." in Options. The "ddeexec" function may cause the error message and Microsoft describe changes to the registry that disable the "ddeexec" function here ...
The registry values that can be changed are at HKEY_CLASSES_ROOT\Excel.Sheet.8\Shell\Open\Command (for .xls files) and at HKEY_CLASSES_ROOT\Excel.Sheet.12\Shell\Open\Command (for .xlsx files). The "command" value can be changed from > EXCEL.EXE /dde < to > EXCEL.EXE /e "%1" <.
These registry edits refer to the default installation folder for Excel at C:\Program Files\Microsoft Office\ ... It may be that Excel did not install to the default folder on your computer because, for example, a previous version of Office or a version of Office document viewer software was already installed. I would expect a likely alternate installation folder to be, as an example for Excel 2013, C:\Program Files\Microsoft Office 15\ ...
I would expect that disabling the "ddeexec" function will help with the message "There was a problem sending the command to the program" in Excel 2007, Excel 2010 and Excel 2013.
Backup and Restore
I have used Restore Points to create backups before making changes described on this page. I have used System Restore to undo changes described on this page. Restore Points and System Restore are described by Microsoft here ... and here ...