Clear Document History

B

Bob

I'm looking for a way to automate the clearing of "My Recent Documents".

To be clear, I'm not talking the "Recently used file list" which is found at
the end of the file menu and has a max entry of 9 files. This can be
controlled with Office Tools\Options\General or GPO's.

I'm also not talking about the "My Recent Documents" found off the start
menu. This can be controlled with Tweak UI or GPO's.

What I am interested in is the "My Recent Documents" which is found by
opening the File menu, selecting "Open" and selecting My Recent Documents in
the left pain of the "Open" window. This will display year’s worth of opened
file history that can be cleared manually with the "Clear Document History"
found under the Tools menu in the "Open" window. By clicking the "Look In"
pull-down menu, it can be seen these shortcuts are kept in the folder:
"%UserName%\Application Data\Microsoft\Office\Recent".

Is there a way to automate the control of "My Recent Documents"?
 
A

Alice Zhu [MSFT]

Dear Bob,

Thanks for posting in the partner newsgroups.

According to your description, my understanding of this issue is: you would
like to know how to automate the control of "My Recent Documents" in the
open file dialog in Office. The Recent folder is located in
"%UserName%\Application Data\Microsoft\Office\Recent".

If I have misunderstood your concern, please feel free to let me know.

Based on my research, we could change the registry key value to control
recent folder. To solve the problem, please try the following methods:

Method 1 Disable Recent files
===========================
We are able to clear the Recent History Registry Key as follows:

1. Open your registry and find the key below.
2. Create a new DWORD value, or modify the existing value called
'NoRecentDocsHistory', set the value to equal '1' to enable the
restriction.
3. Exit your registry; you may need to restart for the changes to take
effect.

Registry Settings
User Key:
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explor
er]

System Key:
[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explo
rer]

Value Name: NoRecentDocsHistory
Data Type: REG_DWORD (DWORD Value)
Value Data: (0 = disable restriction, 1 = enable restriction) 1

Method 2 limit the files in Office Recent folder
===================================
We could try limiting the files in the Office Recent folder. We can specify
a maximum limit to the number of recent document links on a per-file-type
basis. The number of files per extension is managed on a per-file count but
the maximum limits are configured on a per-group basis. There are three
"groups" of files that you can control the maximum of: "Office files",
"non-Office files", and "folders". Each has a DWORD reg value indicating
the number of links to keep alive for that group. For 'non-Office files"
and "folders", that value is the max limit total for all links in each
group. For "Office files" that value is the max for each file type (that
is each file type has its own list containing up to that maximum number of
links).

The reg values are all under this key:
HKCU\Software\Microsoft\Office\11.0\Common\Open
Find\Places\StandardPlaces\Recent
Create a key name: CacheSize
On the right-side of the registry add the three reg values which are
REG_DWORD values (with, in parentheses, the corresponding default value
used if the value is not present):
OfficeFiles (10)
NonOfficeFiles (4)
Folders (20)

For example, the key would have the following:
DWORD Value name: Officefiles
Value data: 10

Additionally, Office does respect the operating system policies which
disable the Recent Files information caching, so if you turn off the Recent
Document tracking policies in the Shell, Office disables its Recent
Document tracking.

Please note that this setting does not affect the links tracked by the
operating system in %USERPROFILE%\Recent. It only affects the Office
specific cache in %USERPROFILE%\Application Data\Microsoft\Office\Recent.
It is the files in this folder that are used to provide the autocomplete
functionality (but only within the Office File Open/Save dialog).

If anything is unclear, please feel free to let me know. I am glad to be
of assistance.

Regards,
Alice Zhu
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
B

Bob

Dear Alice,

Method two worked great! Method one worked also, but it prevented the Start
Menu's My Recent Documents from building up. I use ClearRecentDocsOnExit to
control that one.
Thanks!
 
A

Alice Zhu [MSFT]

Hi Bob,

I am so glad to know the issue has been solved. I appreciate your time and
efforts putting in this troubleshooting process. It's been a pleasant
experience working with you. I hope you were delighted with the service we
provided you.

At present, I would like to provide you with a summary of the key points of
the issue for your reference.

*Issue description:
You would like to know how to automate the control of "My Recent Documents"
in the open file dialog in Office. The Recent folder is located in
"%UserName%\Application Data\Microsoft\Office\Recent".

*Resolution
Change registry key value to limit the files in Office Recent folder or use
ClearRecentDocsOnExit registry key value to clear the Recent folder.

If you encounter any new break/fix issue, please feel free to post your
questions in the newsgroups. We are glad to be of assistance.

Regards,
Alice Zhu
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
====================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
G

Gundemarie Scholz

Alice said:
*Issue description:
You would like to know how to automate the control of "My Recent Documents"
in the open file dialog in Office. The Recent folder is located in
"%UserName%\Application Data\Microsoft\Office\Recent".

*Resolution
Change registry key value to limit the files in Office Recent folder or use
ClearRecentDocsOnExit registry key value to clear the Recent folder.

If you encounter any new break/fix issue, please feel free to post your
questions in the newsgroups. We are glad to be of assistance.

Unfortunately my news server doesn't carry Alice's first posting
(Message ID: <[email protected]>) in this thread
which I found via Google. To quote from it:

=== snip ===
Method 2 limit the files in Office Recent folder
===================================
We could try limiting the files in the Office Recent folder. We can
specify a maximum limit to the number of recent document links on a
per-file-type basis. The number of files per extension is managed on a
per-file count but the maximum limits are configured on a per-group
basis. There are three "groups" of files that you can control the
maximum of: "Office files", "non-Office files", and "folders". Each has
a DWORD reg value indicating the number of links to keep alive for that
group. For 'non-Office files" and "folders", that value is the max
limit total for all links in each group. For "Office files" that value
is the max for each file type (that is each file type has its own list
containing up to that maximum number of links).

The reg values are all under this key:
HKCU\Software\Microsoft\Office\11.0\Common\Open
Find\Places\StandardPlaces\Recent
Create a key name: CacheSize
On the right-side of the registry add the three reg values which are
REG_DWORD values (with, in parentheses, the corresponding default value
used if the value is not present):
OfficeFiles (10)
NonOfficeFiles (4)
Folders (20)

For example, the key would have the following:
DWORD Value name: Officefiles
Value data: 10
=== snip ===

I have followed the instructions and created the necessary key and
values, this is what it looks like:

=== snip ===
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\Open
Find\Places\StandardPlaces\Recent\CacheSize]
"OfficeFiles"=dword:00000004
"NonOfficeFiles"=dword:00000004
"Folders"=dword:00000004
=== snip ===

If I understand the instruction correctly then the folder
%USERPROFILE%\Application Data\Microsoft\Office\Recent should now never
contain more than four links to the most recent let's say Word documents
ending with *.doc, right?

Unfortunately this doesn't happen, so did I miss something important?

Kind regards,
Gunde
 

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