Library code snippets

Clear the Recent Documents list

This short piece of code shows you how to clear the recent document list. All you need to do is add the code below, and call the ClearDocuments procedure

Private Declare Function SHAddToRecentDocs Lib "Shell32" (ByVal lFlags As Long, ByVal lPv As Long) As Long
Public Sub ClearDocuments()
SHAddToRecentDocs 0, 0 'clear all items under Documents
End Sub

Comments

  1. 05 Jul 2005 at 08:53

    Hi,
    I need a vb code that would delete the temporary internet files and cookies on the click of a button

  2. 01 Jan 1999 at 00:00

    This thread is for discussions of Clear the Recent Documents list.

Leave a comment

Sign in or Join us (it's free).