Use the code below to add a file to the resents folder or to clear the resents folder.

Create a text file named "myfile" and put it in the "c" directory. Then add two command buttons to the form, and cut and paste the code below.

==========================================================
Option Explicit
Private Declare Sub SHAddToRecentDocs Lib _
"shell32.dll" (ByVal uFlags As Long, ByVal pv _
As String)

Private Sub Command1_Click()
Dim strNewFile As String

'This will add the myfile to the recent folder
strNewFile = "c:\myfile.txt"
Call SHAddToRecentDocs(2, strNewFile)
End Sub

Private Sub Command2_Click()
'This will clear the recent folder
Call SHAddToRecentDocs(2, vbNullString)
End Sub