Go Back   Wiki NewForum | Latest Entertainment News > Career Forum & Tips > Tech Forum & Tutorial > Oracle Database, SQL, Application, Programming


Add documents to "Start | Documents" menu


Reply
Views: 2454  
Thread Tools Rate Thread
  #1  
Old 08-20-2010, 10:59 AM
bholas bholas is offline
Award Winner
 
Join Date: Apr 2010
Posts: 4,977
Default Add documents to "Start | Documents" menu

By default, Windows will keep track of the documents that you work with and most of the time add them to your "Start | Documents" menu. If you want to add documents to this list from your program (without any user interaction), here's a simple function that can do just that:

uses ShellAPI, ShlOBJ;

procedure AddToStartDocumentsMenu(
sFilePath : string );
begin
SHAddToRecentDocs(
SHARD_PATH,
PChar( sFilePath ) );
end;
Now, you can just call AddToStartDocumentsMenu() with the document you want to add. For example:
AddToStartDocumentsMenu( 'c:\windows\MyWork.txt' );

Reply With Quote
Reply

Tags
programming tips

New topics in Oracle Database, SQL, Application, Programming





Powered by vBulletin® Version 3.8.10
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
WikiNewForum)