CodeItBetter Programming Another VB Programming Blog

How to clear Documents List (under the Start button)

Posted on January 4, 2009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
'System & API - How to clear Documents List (under the Start button)
Option Explicit
 
Private Declare Sub SHAddToRecentDocs Lib "shell32.dll" (ByVal uFlags As Long, ByVal PV As String)
 
Sub Main()
    Dim MyResult As Boolean
    MyResult = ClearDocumentsMenu()
    If MyResult = True Then
        MsgBox "Documents removed."
    Else
        MsgBox "Documents not removed."
    End If
End Sub
 
Public Function ClearDocumentsMenu() As Boolean
    'Returns true if successful, false otherwise
    SHAddToRecentDocs 2, vbNullString
    ClearDocumentsMenu = Err.LastDllError = 0
End Function

Related posts:

  1. How to add a Document name to the Recent Documents list (under Start Button)
  2. How to Clear Windows Recent Documents List from your Visual Basic Application
  3. How to add a given file to Windows Recent Documents List
  4. How to clear Start Menu -> Run MRU list
  5. How to Show/Hide the Start Button from the task bar
  6. How to add text to Microsoft Word documents from VB
  7. _-Start Owner-_ Change the Text Of Your Start Button!
  8. How to List Network Computers
  9. How to Open Start Menu using VB Code
  10. How to Start another program using Shell and wait until it finishes.

Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.