Search Tools Links Login

Clear Recent Documents List

Posted: 2002-06-01
By: ArchiveBot
Viewed: 73

Filed Under:

VB6 Code Cache

No attachments for this post

Clears the recent documents list with a single command. Easy to implement in a text editor, or in some sort of trace-deleter program..

Original Author: rudz


place in a module, set 'Sub Main' as startup, press F5.


0 if no error occoured.

Side Effects

if there's _many_ entries in recent folder, have patience :)

API Declarations

Private Declare Function SHAddToRecentDocs Lib "Shell32" (ByVal lFlags As Long, ByVal lPv As Long) As Long


' Name : Clear all recent documents
' By  : Rudy Alex Kohn
'   []
Public Function ClearRecent()
' Clear the 'Recent Document' list
' Returns 0 if successfull
ClearRecent = SHAddToRecentDocs(0, 0)
End Function
Sub Main()
If MsgBox("This will clean the 'Recent Documents', proceed?", 68, "Clear Recent Documents List") = 7 Then End
If ClearRecent <> 0 Then MsgBox "Error.."
End Sub

Comments on this post

No comments have been added for this post.

You must be logged in to make a comment.