How do I clear the "recent documents" list?

G

Guest

I just installed Office 2007. Word and Excel can't seem to find the recent
documents even though the files are listed. How can I clear the recent
documents list? Thanks!
 
J

Jim Rech

Excel does not check whether a file still exists when it builds the MRU
list. This is a macro I put in my Personal.xls and I run it automatically
every time Excel starts.

''Removes nonexistent files from XL12's MRU list
Sub CleanupMRU()
Dim wsh As Object, fso As Object
Dim Res As String, Counter As Integer
Dim Ptr As Integer, FName As String
On Error Resume Next
Set wsh = CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
For Counter = 1 To 50
Res = wsh.RegRead("HKCU\Software\Microsoft\Office\12.0\Excel\File
MRU\Item " & Counter)
Ptr = InStr(1, Res, "*", 1)
If Ptr > 0 Then
FName = Mid(Res, Ptr + 1)
If Not fso.FileExists(FName) Then
wsh.RegDelete "HKCU\Software\Microsoft\Office\12.0\Excel\File
MRU\Item " & Counter
End If
End If
Next
End Sub

--
Jim

|I just installed Office 2007. Word and Excel can't seem to find the recent
| documents even though the files are listed. How can I clear the recent
| documents list? Thanks!
| --
| jim
 
G

George Nicholson

For a non-code solution, try: Tools>Options>General and turn MRU off (or set
to zero) & then reverse the process to turn in on again. At that point your
MRU list should be empty but it will start rebuilding from that point
forward.

HTH,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top