RecentFile Object
Word Developer Reference |
Represents a recently used file. The RecentFile object is a member of the RecentFiles collection.
Remarks
The RecentFiles collection includes all the files that have been used recently. The items in the RecentFiles collection are displayed at the bottom of the File menu.
Use RecentFiles(Index), where Index is the index number, to return a single RecentFile object. The index number represents the position of the file on the File menu. The following example opens the first document in the RecentFiles collection.
Visual Basic for Applications |
---|
|
Use the Add method to add a file to the RecentFiles collection. The following example adds the active document to the list of recently-used files.
Visual Basic for Applications |
---|
|
The SaveAs and Open methods include an AddToRecentFiles argument that controls whether or not a file is added to the recently-used-files list when the file is opened or saved.
See Also