"Could not create the work file” error in Office

Symptoms

When you try to preview or save a document, Word returns the following error message:

Word could not create the work file. Check the temp environment variable.

Resolution

Scan for malware and disk errors

  1. Run an antivirus scan. If your antivirus program doesn’t detect any malware, check for corrupted files or disk errors.

  2. Open an elevated Command Prompt window. To do this, select Start, enter cmd, and then press Enter.

  3. In the search results, right-click Command Prompt, and then select Run as administrator.

  4. Enter sfc.exe /scannow, and press Enter.

  5. After the check is done and any errors are repaired, enter chkdsk /r /f, and then press Enter.

  6. Restart your device, and try the action in Word again. If the error still occurs, try the next method.

Add an Environment Variable

  1. Select Start > Settings > System > About.

  2. Scroll down to Related settings, and then select Advanced system settings.

  3. Select Environment Variables.

  4. Under User variables for <username> (where <username> is your user name), select the New button.

  5. In the Variable name field, enter %userprofile%.

  6. In the Variable value field, enter C:\Users\<username> (where <username> is the same value as <username> in step 4).

  7. Select OK, and then select OK on any confirmation window that opens.

  8. Restart your device, and try the action in Word again. If the error still occurs, try the next method.

Create a Temporary Internet Files folder

  1. Start Windows Explorer.

  2. Navigate to the following folder:

    C:\Users\<username>\AppData\Local\Microsoft\Windows\INetCache

    Note: In this path, <username> represents your user profile name.

  3. Create a folder, and name it Content.Word.

    Note: It might be necessary to turn on Hidden Items on the View ribbon of Windows Explorer.

  4. Restart your device, and try the action in Word again. If the error still occurs, try the next method.

Turn off Preview pane or edit registry

To work around the issue, turn off the Preview pane in File Explorer.

Screenshot of selecting the Preview Pane after selecting View tab in File Explorer.

If you want to keep the Preview Pane active, edit the following registry subkeys to fix the error.

Important

Follow the steps in this section carefully. Serious problems might occur if you modify the registry incorrectly. Before you modify it, back up the registry for restoration in case problems occur.

To work around this issue, delete the following registry keys:

  1. Select Start > Run.

  2. Enter regedit in the Open: box, and then select OK.

  3. Search for and delete the following registry subkeys:

    • Word Preview: HKCR\CLSID\{84F66100-FF7C-4fb4-B0C0-02CD7FB668FE}
    • PowerPoint Preview: HKCR\CLSID\{65235197-874B-4A07-BDC5-E65EA825B718}
    • Excel Preview: HKCR\CLSID\{00020827-0000-0000-C000-000000000046}
  4. Close Registry Editor, and restart Windows.