Can someone please give me the registry key to Clear Recent Documents
Thanks![]()
Professional Software Development Tools
Can someone please give me the registry key to Clear Recent Documents
Thanks![]()
I think you'll find that it depends which MRU list you are thinking about there are some here.
clear it with API, a call to "SHAddToRecentDocs_(2,0)" in shell32.dll with a "0" as ther last arg will clear recent docs, "SHAddToRecentDocs_(2,File)" to add a file (where "File" is the full path to the file.)
MSDN
http://msdn.microsoft.com/en-us/libr...05(VS.85).aspx
Code:to clear result = DLL.CallFunction(_SystemFolder.."\\shell32.dll", "SHAddToRecentDocs", "2,0", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL); to add sFile="path\\to\\my\\file.ext" result = DLL.CallFunction(_SystemFolder.."\\shell32.dll", "SHAddToRecentDocs", "2,'"..sFile.."'", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
Open your eyes to Narcissism, Don't let her destroy your life!!
add file to recent docs, the quotation is wrong, the correct way is
Code:sFile=_SourceFolder.."\\AutoPlay\\Docs\\test.ext" result = DLL.CallFunction(_SystemFolder.."\\shell32.dll", "SHAddToRecentDocs", "2,\""..sFile.."\"", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
Open your eyes to Narcissism, Don't let her destroy your life!!
Thanks longedge for the link and
RizlaUK Thank you very much it worked
Code:result = DLL.CallFunction(_SystemFolder.."\\shell32.dll", "SHAddToRecentDocs", "2,0", DLL_RETURN_TYPE_INTEGER, DLL_CALL_STDCALL);
![]()