How to: Programmatically list recently used workbook files
Applies to: Visual Studio Visual Studio for Mac Visual Studio Code
The RecentFiles property returns a collection that contains the names of all the files that appear in the Microsoft Office Excel list of recently used files. The length of the list varies depending on the number of files the user has selected to retain. You can display the results in a range.
Applies to: The information in this topic applies to document-level projects and VSTO Add-in projects for Excel. For more information, see Features available by Office application and project type.
To list recently used workbooks in a range object
Loop through the list of recent files and display the names in cells relative to a Range object.
Submit and view feedback for