Word

Clear Most Recent Used File List

Ease of Use

Easy

Version tested with

2000, 2002, 2003 

Submitted by:

MOS MASTER

Description:

This sub clears the recent used file list from the File menu. 

Discussion:

Depending on your settings in Word the recent file list can grow pretty big. Sometimes you just want to clear all the entries to start over fresh. This sub helps you. 

Code:

instructions for use

			

Option Explicit ' \\ This sub will clear the recent file list onder the File menu Sub ClearMRU() Dim oRecentFile As Word.RecentFile ' \\ Loop through all recent file entries For Each oRecentFile In Application.RecentFiles ' \\ delete entry oRecentFile.Delete Next End Sub

How to use:

  1. Open your Word document.
  2. Press Alt + F11 to open VBE.
  3. Insert-Module. (Insert -> module)
  4. Paste the code in the right (code) pane. (Ctrl + V)
  5. Close VBE (Alt + Q or press the X in the top right hand corner).
  6. Save the file.
 

Test the code:

  1. Go to the File menu over there you see the list of files you've recently opened.
  2. From Word, press Alt + F8 to open the macro dialog box.
  3. Select ClearMRU
  4. Click Run.
  5. Go to the File menu. The list is cleared.
 

Sample File:

Clear MRU.zip 4.61KB 

Approved by mdmackillop


This entry has been viewed 70 times.

Please read our Legal Information and Privacy Policy
Copyright @2004 - 2020 VBA Express