Selectively clear recent document list


G

Geoff Budd

I use a macro to clear the recent documents list in Word 2007 as follows:

Sub ClearMRU()
' Clears the list of most recently used documents
Dim ListSize
Application.DisplayRecentFiles = True
ListSize = Application.RecentFiles.Maximum
Application.RecentFiles.Maximum = 0
Application.RecentFiles.Maximum = ListSize
End Sub

However, what I would really like to do is only clear the list of documents
that have not been "pinned". Does anyone know a way of clearing the list but
leaving the "pinned" ones on the list?

Many thanks,
Geoff
 
Ad

Advertisements

T

Tony Jollans

That neither shows the 'pin' status of an entry, nor allows its use as a
selection criterion, because, AFAIK, the Obect Model does not provide the
information. I stand by what I first said that this can not be done without
digging in the registry.
 
S

Suzanne S. Barnhill

There's something about pinning, though--perhaps that when you reset to zero
and then restore to a positive number the pinned ones come back?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
Ad

Advertisements

T

Tony Jollans

I don't know of anything, except that I think they get a sort of priority
when you reduce the size of the list to anything other than zero - but doing
this does not cause the registry to be cleared so if you increase the size
of the list again, it just brings back all the ones you had before.

I don't think it would be enormously difficult to add some sort of feature
to Greg's macro but I don't have time at the moment and I suspect Greg -
game though I'm sure he'd be - would need some help to pull the flags out of
the registry.
 
S

Suzanne S. Barnhill

It appears from another thread that Graham has already done this and is
adding it to his Web site, but Jay hints that this won't be necessary in
Word 2010.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org
 
T

Tony Jollans

Thank you Suzanne. I'm just re-installing Word 2010 and will then have a
look at the changes there.
 
G

Greg Maxey

Thank youSuzanne. I'm just re-installing Word 2010 and will then have a
look at the changes there.

--
Enjoy,Tony

 www.WordArticles.com







- Show quoted text -

Ms. Barnhill, Jay, Tony, Graham

I updated the webpage to include the feature to delete "All,"
"Selected," "Pinned," and "Unpinned" files. The pinned and unpinned
options are only availabe in Word2007.

http://gregmaxey.mvps.org/Recent_Files_List_Editor.htm

I stole some code snips from Graham's post ;-)
 
Ad

Advertisements

S

Suzanne S. Barnhill

I'm sure you must have meant to address Ms. Barnhill, Mr. Freedman, Mr.
Jollans, and Mr. Mayor. <g>

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

Thank youSuzanne. I'm just re-installing Word 2010 and will then have a
look at the changes there.

--
Enjoy,Tony

www.WordArticles.com

message





- Show quoted text -

Ms. Barnhill, Jay, Tony, Graham

I updated the webpage to include the feature to delete "All,"
"Selected," "Pinned," and "Unpinned" files. The pinned and unpinned
options are only availabe in Word2007.

http://gregmaxey.mvps.org/Recent_Files_List_Editor.htm

I stole some code snips from Graham's post ;-)
 

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