Office Settings & Configuration

Prevent a Word Document from Appearing in Recent Files

Huma Ashraf ChHuma Ashraf Ch Nov 20, 2026 868 views

Question details

The user wants to prevent one Word document from remaining in the Recent files list.

Prevent a Word Document from Appearing in Recent Files
Product
Microsoft Word
Device & OS
not provided
Scenario
A user wants to open a particular document without keeping it in Word's Recent files list.
Observed behavior
Word does not offer a standard document-specific setting to permanently hide one file from the list.
Before you start

Use desktop Word for the VBA solution and check whether your organization's security policy permits macros. Enable macros only in documents you trust.

Solution 1Recommended

Remove the Document Automatically with an AutoOpen Macro

Use a document-level macro to remove this file from Word's Recent list when it opens.

The macro must be stored in the target document, not in Normal.dotm, and the document must be saved as a macro-enabled .docm file. It runs only when macros are allowed.

1
Open the VBA editor

Open the document in desktop Word, then select Developer > Visual Basic. If the Developer tab is hidden, enable it under File > Options > Customize Ribbon.

2
Insert a document module

In the VBA editor's Project pane, select the project for the target document, then choose Insert > Module. Do not select the Normal project.

3
Add the macro

Paste the following code into the new module: Sub AutoOpen() Dim i As Long For i = Application.RecentFiles.Count To 1 Step -1 If StrComp(Application.RecentFiles(i).Name, ActiveDocument.Name, vbTextCompare) = 0 And _ StrComp(Application.RecentFiles(i).Path, ActiveDocument.Path, vbTextCompare) = 0 Then Application.RecentFiles(i).Delete End If Next i End Sub

4
Save as a macro-enabled file

Return to Word and choose File > Save As. Select Word Macro-Enabled Document (*.docm), then save the file.

5
Test the result

Close and reopen the .docm file, enable its macros if you trust it and are prompted, then check File > Open > Recent. If you save a copy under another name, open that copy to run its macro.

Remove the Document Automatically with an AutoOpen Macro
Scope of removal: This removes the matching entry from Word's Recent list, not necessarily from Windows, cloud services, or other recent-file lists. If macros are blocked, it will not run.
Free Microsoft Office alternative

Work with Word Documents in WPS Writer

WPS Office is a free, lightweight Office alternative with a familiar interface for opening and editing Word documents. Its format compatibility makes it easy to move everyday document work to WPS Writer; it does not change Microsoft Word's Recent files behavior.

Open and edit Microsoft Word DOC and DOCX filesManage everyday documents in a familiar Writer interfaceMove compatible documents to WPS without recreating themUse a free, lightweight office suite
microsoft office alternative - wps office

Frequently Asked Questions

Can I hide just one document using a Word setting?

Word does not provide a standard per-document setting for this. You can remove its entry through File > Open > Recent, or use a document-level macro to remove it when the file opens.

Why does my AutoOpen macro run for every document?

It may have been saved in Normal.dotm. In the VBA editor, move the macro to a standard module in the target document's project and save that document as a .docm file.

Will the macro work if macros are disabled?

No. The document's macro must be permitted to run. If your organization blocks macros or you do not trust the file, use File > Open > Recent and remove the entry manually instead.

Does removing a file from Word's Recent list delete it?

No. Right-clicking a file under File > Open > Recent and selecting Remove from list removes the shortcut from that list, not the document itself.

What happens if I save the document under a different name?

The newly named .docm file can have its own Recent entry. Open the new file with its macro enabled so the macro can remove that entry.