by rudz (10 Submissions)
Category: Windows System Services
Compatability: Visual Basic 3.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating:
(3 Votes)
Clears the recent documents list with a single command. Easy to implement in a text editor, or in some sort of trace-deleter program..
Assumes
place in a module, set 'Sub Main' as startup, press F5.
Code Returns
0 if no error occoured.
Side Effects
if there's _many_ entries in recent folder, have patience :)
API DeclarationsPrivate Declare Function SHAddToRecentDocs Lib "Shell32" (ByVal lFlags As Long, ByVal lPv As Long) As Long
' Name : Clear all recent documents
' By : Rudy Alex Kohn
' [[email protected]]
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