shell.SHAddToRecentDocs

SHAddToRecentDocs(Flags, data)

Adds a document to the shell's list of recently used documents or clears all documents from the list. The user gains access to the list through the Start menu of the Windows taskbar.

Parameters

Flags : int

Value from SHARD enum indicating how the item is identified.

data : object

Type of input is determined by the SHARD_* flag. Use None to clear recent items list.

Flags Type of input
SHARD_PATHAString containing a file path
SHARD_PATHWString containing a file path
SHARD_PIDLPyIDL, or a buffer containing a PIDL (see shell::PIDLAsString)
SHARD_APPIDINFOTuple of (PyIShellItem, str), where str is an AppID
SHARD_APPIDINFOIDLISTTuple of (PyIDL, str), where str is an AppID
SHARD_LINKPyIShellLink
SHARD_APPIDINFOLINKTuple of (PyIShellLink, str) where str is an AppID
SHARD_SHELLITEMPyIShellItem

Comments

On Windows 7, the entry is also added to the application's jump list.

The underlying API function has no return value, and therefore no way to indicate failure.

Win32 API References

Search for SHAddToRecentDocs at msdn, google or google groups.