Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent Document Lists

Status
Not open for further replies.

cwalshe

Programmer
May 28, 2001
84
IE
Hi,

I am trying to access the recent documents list.

I am aware that it is noramlly stored in /Winnt/Profiles/recent/name, but what happens when you dont know the name of the person that is using the computer.

Also how can you access the file and read the information for it.

Thx,

Cormac.
 
use an API call to get the name of the user

Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" _
(ByVal lpBuffer As String, nSize As Long) As Long

In a sub somewhere

dim strUserName as string
dim retval as long
strUserName = Space(255)
retval = GetUserName(strUserName, 255)
strUserName = Left$(strUserName, InStr(strUserName, vbNullChar) - 1)

This will give you the name of the Profile user.

Also, the Recent folder is just a list of shortcuts to the most recently opened files. The MRU lists for apps themselves are stored in a mixture of places. Some apps, like Office, store it under Application Data within each profile in a Recent folder. Others like Media Player store it in the registry.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top