VB and VBA Users Source Code: Edit the files stored in the "Documents" menu
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Edit the files stored in the "Documents" menu
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Wednesday, December 13, 2000
Hits:
518
Category:
Windows API
Article:
To add or delete files stored in the "Start", "Documents" menu, use the following routine: Private Declare Sub SHAddToRecentDocs Lib "shell32.dll" (ByVal uFlags As Long, ByVal pv As String) 'Purpose : Manipulate the files stored in the "Documents" list (under the "Start Menu") 'Inputs : sAddFileName The name of the file to add ' [bClearAllDocuments] If True, clears all the files in the document list 'Outputs : N/A 'Author : Andrew Baker 'Date : 13/12/2000 10:33 'Notes : 'Revisions : 'Assumptions : Sub DocumentsList(sAddFileName As String, Optional bClearAllDocuments As Boolean = False) If bClearAllDocuments Then 'Clear list of files Call SHAddToRecentDocs(2, vbNullString) Else 'Add a new file Call SHAddToRecentDocs(2, sAddFileName) End If End Sub
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder