Unlike creating a shortcut anywhere else, adding a file (shortcut) to the recent documents list is very easy:
Private Const SHARD_PATH = &H2&
Private Declare Function SHAddToRecentDocs Lib "Shell32.dll" (ByVal dwflags As Long, ByVal dwdata As String) As Long
Private Sub cmdCreate_Click()
SHAddToRecentDocs SHARD_PATH, txtFile.Text
End Sub
Comments