ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I clear the "recent documents" list? (https://www.excelbanter.com/excel-discussion-misc-queries/137994-how-do-i-clear-recent-documents-list.html)

Jim

How do I clear the "recent documents" list?
 
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

Jim Rech

How do I clear the "recent documents" list?
 
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\E xcel\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\Fil e
MRU\Item " & Counter
End If
End If
Next
End Sub

--
Jim

"Jim" wrote in message
...
|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



George Nicholson

How do I clear the "recent documents" list?
 
For a non-code solution, try: ToolsOptionsGeneral 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,


"Jim" wrote in message
...
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





All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com