Recent Documents List - suggestion for Microsoft

G

Geoff Budd

Could Microsoft please provide a facility in Word 2007 for deleting all the
entries in the "Recent Documents" list, except for those that are "pinned".
For example, by providing an extra command in the Office button?

There have been a number of threads on this topic and it would give users
greater control over selectively deleting such links to sensitive documents
without having to remove all the other links.

Thank you.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/com...2a4ae8&dg=microsoft.public.word.docmanagement
 
G

Graham Mayor

I am compiling this reply off-line as a storm in the next town has
apparently taken out much of the internet access where I live, so it is
anyone's guess when this will actually reach the thread - so apologies if it
has already been answered..

In Word 2007, the recent file list is stored in the registry at
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\File MRU
Each item has a prefix which may be
[F00000000]
[F00000001]
[F00000002]
or
[F00000003]

An item prefixed [F00000000] is neither read only nor pinned to the list
If the item is pinned a '1' is added to the number thus "[F00000001]". If
the item is Read Only, then a '2' is added to the list, thus "[F00000002]"
and if the item is both read only and pinned the numbers are added thus
"[F00000003]". You can interrogate the registry entries with a macro to see
what the prefix is and if it contains [F00000000] or [F00000002] (neither
pinned) you can delete the entry.

The following will therefore delete all the entries from the Word 2007
recent file list that are not pinned to the list :)

See http://www.gmayor.com/installing_macro.htm

Sub ClearMRU()
Dim rFile As RecentFile
Dim WSHShell, RegKey, rKeyWord
Set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\File MRU\"
For Each rFile In RecentFiles
rKeyWord = WSHShell.RegRead(RegKey & "Item " & rFile.Index)
If InStr(1, rKeyWord, "[F00000000]") Then
rFile.Delete
End If
If InStr(1, rKeyWord, "[F00000002]") Then
rFile.Delete
End If
Next rFile
End Sub

Reinstatement of my internet connection, when it occurs, will also make
available modifications to my web page
http://www.gmayor.com/clear_recently_used_file_list.htm with a version that
gives the user the choice of whether to clear pinned items or not.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Geoff Budd

Hi Graham,
I'm sure your macro will do the job but I am making a plea to Microsoft to
make it easy for the average user who is not into macros (especially where
macros start playing around with registry keys that can be catastrophic if
you get it wrong and if, like me, you're not too confident in that area).
Regards,
Geoff

Graham Mayor said:
I am compiling this reply off-line as a storm in the next town has
apparently taken out much of the internet access where I live, so it is
anyone's guess when this will actually reach the thread - so apologies if it
has already been answered..

In Word 2007, the recent file list is stored in the registry at
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\File MRU
Each item has a prefix which may be
[F00000000]
[F00000001]
[F00000002]
or
[F00000003]

An item prefixed [F00000000] is neither read only nor pinned to the list
If the item is pinned a '1' is added to the number thus "[F00000001]". If
the item is Read Only, then a '2' is added to the list, thus "[F00000002]"
and if the item is both read only and pinned the numbers are added thus
"[F00000003]". You can interrogate the registry entries with a macro to see
what the prefix is and if it contains [F00000000] or [F00000002] (neither
pinned) you can delete the entry.

The following will therefore delete all the entries from the Word 2007
recent file list that are not pinned to the list :)

See http://www.gmayor.com/installing_macro.htm

Sub ClearMRU()
Dim rFile As RecentFile
Dim WSHShell, RegKey, rKeyWord
Set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\File MRU\"
For Each rFile In RecentFiles
rKeyWord = WSHShell.RegRead(RegKey & "Item " & rFile.Index)
If InStr(1, rKeyWord, "[F00000000]") Then
rFile.Delete
End If
If InStr(1, rKeyWord, "[F00000002]") Then
rFile.Delete
End If
Next rFile
End Sub

Reinstatement of my internet connection, when it occurs, will also make
available modifications to my web page
http://www.gmayor.com/clear_recently_used_file_list.htm with a version that
gives the user the choice of whether to clear pinned items or not.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



Geoff said:
Could Microsoft please provide a facility in Word 2007 for deleting
all the entries in the "Recent Documents" list, except for those that
are "pinned". For example, by providing an extra command in the
Office button?

There have been a number of threads on this topic and it would give
users greater control over selectively deleting such links to
sensitive documents without having to remove all the other links.

Thank you.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click
the "I Agree" button in the message pane. If you do not see the
button, follow this link to open the suggestion in the Microsoft
Web-based Newsreader and then click "I Agree" in the message pane.

http://www.microsoft.com/office/com...2a4ae8&dg=microsoft.public.word.docmanagement
 
J

Jay Freedman

Hi Geoff,

I hope it isn't giving away too much to say that your wish will be
granted in Word 2010. As long as you're using Word 2007, though,
Graham's macro will have to suffice.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.


Hi Graham,
I'm sure your macro will do the job but I am making a plea to Microsoft to
make it easy for the average user who is not into macros (especially where
macros start playing around with registry keys that can be catastrophic if
you get it wrong and if, like me, you're not too confident in that area).
Regards,
Geoff

Graham Mayor said:
I am compiling this reply off-line as a storm in the next town has
apparently taken out much of the internet access where I live, so it is
anyone's guess when this will actually reach the thread - so apologies if it
has already been answered..

In Word 2007, the recent file list is stored in the registry at
HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\File MRU
Each item has a prefix which may be
[F00000000]
[F00000001]
[F00000002]
or
[F00000003]

An item prefixed [F00000000] is neither read only nor pinned to the list
If the item is pinned a '1' is added to the number thus "[F00000001]". If
the item is Read Only, then a '2' is added to the list, thus "[F00000002]"
and if the item is both read only and pinned the numbers are added thus
"[F00000003]". You can interrogate the registry entries with a macro to see
what the prefix is and if it contains [F00000000] or [F00000002] (neither
pinned) you can delete the entry.

The following will therefore delete all the entries from the Word 2007
recent file list that are not pinned to the list :)

See http://www.gmayor.com/installing_macro.htm

Sub ClearMRU()
Dim rFile As RecentFile
Dim WSHShell, RegKey, rKeyWord
Set WSHShell = CreateObject("WScript.Shell")
RegKey = "HKEY_CURRENT_USER\Software\Microsoft\Office\12.0\Word\File MRU\"
For Each rFile In RecentFiles
rKeyWord = WSHShell.RegRead(RegKey & "Item " & rFile.Index)
If InStr(1, rKeyWord, "[F00000000]") Then
rFile.Delete
End If
If InStr(1, rKeyWord, "[F00000002]") Then
rFile.Delete
End If
Next rFile
End Sub

Reinstatement of my internet connection, when it occurs, will also make
available modifications to my web page
http://www.gmayor.com/clear_recently_used_file_list.htm with a version that
gives the user the choice of whether to clear pinned items or not.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>



Geoff said:
Could Microsoft please provide a facility in Word 2007 for deleting
all the entries in the "Recent Documents" list, except for those that
are "pinned". For example, by providing an extra command in the
Office button?

There have been a number of threads on this topic and it would give
users greater control over selectively deleting such links to
sensitive documents without having to remove all the other links.

Thank you.

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click
the "I Agree" button in the message pane. If you do not see the
button, follow this link to open the suggestion in the Microsoft
Web-based Newsreader and then click "I Agree" in the message pane.

http://www.microsoft.com/office/com...2a4ae8&dg=microsoft.public.word.docmanagement
 
G

Graham Mayor

The registry is simply a file that stores information about your programs
and their use. The macro doesn't 'play about' with registry keys - it merely
reads them. As for 'getting it wrong' I am sure that average users can
manage copy and paste!

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Geoff Budd

Graham,
The point I was trying to make is that most users would prefer to use
features in applications via the standard user interface, rather than having
to write macros (or copy and paste macros kindly developed by others for
them). There is always the risk with using one's own home-grown macro that
Microsoft might change the way their applications work in future and so it
might no longer work.
My reference to playing about with registry keys was not meant as a
criticism, but the command "rFile.Delete" in your macro presumably deletes a
record from the particular registry key (which in this case is what is
required). Having been in IT all my working life (and written a lot of
software in that time), I know that most users only want to be able to use a
software app to achieve their objectives, and have no wish to delve into the
mysteries of Visual Basic - they would much rather use the standard user
interface for that app. Hence my suggestion to Microsoft that they provide
the selective clearance of "most recently used" files via a standard Word
feature.
I have used your macro, by the way, and it works very well - thank you.
Best wishes,
Geoff
 
G

Graham Mayor

As Jay has indicated, this will be included in the next release. For Word
2007 users that option is not available within the application and is
unlikely to be added - given that the program provides no obvious means of
clearing the recent file list. I'm afraid that a macro is the only option.

If you need to edit the list selectively, Greg Maxey has an add-in to do
that http://gregmaxey.mvps.org/Recent_Files_List_Editor.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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