The Recent Files Object

Another way to open Word documents is to use the RecentFiles object, which is the collection of the most recently used files displayed on Word's Office menu. Each item on this list is a RecentFile object.

You specify a RecentFile object by using RecentFiles(Index), where Index is an integer that specifies the file you want to work with. The most-recently used file is 1, the second most-recently used file is 2, and so on.

^ The maximum value of Index is given by the RecentFiies.Maximum property. Note,too,that you can set this property. For example,the following statement sets the maximum value to 50 (the highest Word allows for this value):

RecentFiies.Maximum = 50

0 0

Post a comment