Double-clicking a file opens Office but not the document
Double-clicking a workbook or document launches the application to an empty grey window, or shows "There was a problem sending the command to the program". The file opens correctly from File → Open, which is what identifies this as the launch path rather than the file.
What you see
Excel or Word starts, and then sits there empty. The file opens perfectly from inside the application. Frequently starts after an application crash, an Office update, or a repair of some unrelated program.
What is actually wrong
Explorer hands a double-clicked file to Office over Dynamic Data Exchange rather than as a command-line argument. The "Ignore other applications that use DDE" option turns that off — it exists as a workaround for a much older problem and gets enabled accidentally, by a crash or by following out-of-date advice. A broken per-user file association does the same thing for a different reason.
Codes and articles
Start here — find out which fix applies
A script that runs the 2 inspection commands from the write-up below and prints what each one returned. It reads the machine and changes nothing — every command that could write, delete, start or stop is excluded from it by construction. Run this first, then pick the fix its output points at.
Fixes (2)
Turn off "Ignore other applications that use DDE"
The application opens empty, or complains about sending the command to the program.
In Excel: File → Options → Advanced → General → clear "Ignore other applications that use Dynamic Data Exchange (DDE)". Word has the same option in the same place.
Or read and clear it directly, which is quicker across several machines.
Get-ItemProperty 'HKCU:\Software\Microsoft\Office\16.0\Excel\Options' -Name IgnoreOtherApps -ErrorAction SilentlyContinueA value of 1 is the fault. The value being absent, or 0, means the setting is not the cause and you should move to the file association fix.
Set it back to 0.
Set-ItemProperty 'HKCU:\Software\Microsoft\Office\16.0\Excel\Options' -Name IgnoreOtherApps -Type DWord -Value 0Close Excel completely and double-click a file to test.
Get-Process EXCEL -ErrorAction SilentlyContinue | Stop-Process -Force
Reset the file association
The DDE setting is not the cause, or the wrong program is opening the file.
Look at the per-user choice Windows is honouring.
Get-ItemProperty 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xlsx\UserChoice' -ErrorAction SilentlyContinue | Select-Object ProgIdThe per-user choice overrides the machine-wide association. A previous default set by another application — a viewer, a competing suite, an installer that grabbed the extension — lives here and survives an Office repair.
Remove the per-user override so the machine default applies again.
Remove-Item 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.xlsx\UserChoice' -Force -ErrorAction SilentlyContinueSet the default again through Settings → Apps → Default apps, choosing Excel for the extension. Setting it through the interface writes the hash Windows requires; writing ProgId directly does not work on current builds.
Windows validates UserChoice with a hash of the user SID, the extension and the ProgId. A value written by hand fails validation and is silently ignored, which is why registry-only fixes for this appear to do nothing.
If several extensions are affected, run the Office quick repair, which re-registers all of them at once.
& "$env:CommonProgramFiles\Microsoft Shared\ClickToRun\OfficeClickToRun.exe" scenario=Repair platform=x64 culture=en-us RepairType=QuickRepair DisplayLevel=True
Related faults
Where this stops. This write-up was written and checked by hand. It says what each step changes, how to confirm it worked and how to reverse it, and anything destructive is flagged before you reach it. If it does not match what your machine is doing, search the Support Centre for the exact code or message — and when something needs a person, get in touch.