how do I remove an item from the recently used files list

S

Sandy MCP

I cannot find a way to remove one file from the list of recently used files
drop down in office. Is there a way? This is Office 2007, excel and word.
Thanks
 
R

Reb

You can limit the number of documents displayed in the list but you cannot
delete individual documents.

In Excel or Word:
Click the Microsoft Office Button, and then click the Options button.
Click Advanced.
Under Display, in the Show this number of Recent Documents list, click the
number of files that you want to display. If you do not want to display any
files, click 0.
Tip To keep a file in the Recent Documents list, click the Microsoft
Office Button, and then click Pin this document to the Recent Documents list
.. When a document is pinned to the Recent Documents list, the pin button
looks like a push pin viewed from the top.
 
D

Dana DeLouis

I cannot find a way to remove one file from the list of recently used files

It's indexed, so you start from the bottom up...

Sub TestIt()
MRU_FileRemove ("Book1.xlsm")
End Sub

Sub MRU_FileRemove(filename As String)
Dim j As Long
Dim s As String

With Application
If .RecentFiles.Maximum = 0 Then Exit Sub
For j = .RecentFiles.Count To 1 Step -1
s = Dir(.RecentFiles.Item(j).Path)
If StrComp(s, filename, vbTextCompare) = 0 Then
.RecentFiles.Item(j).Delete
Exit Sub
End If
Next j
End With
End Sub

- -
HTH :>)
Dana DeLouis
 

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