FileList

Syntax

FileList Number

Remarks

Opens one of the files in the list of recently used files at the bottom of the File menu. (Word defines "used" as either opened or saved.) Number corresponds to the number next to the filename listed on the File menu (from 1 through 9) you want to open. If Number is greater than the number of files listed, an error occurs. If the specified file is already open, Word activates the document.

You can control the number of filenames that appear on the File menu with the Recently Used File List option on the General tab in the Options dialog box (Tools menu).

Example

This example opens the most recently used file. You can include these instructions in an AutoExec macro so that every time you start Word, the most recently used file is opened automatically. If there is no file listed on the File menu, On Error Resume Next prevents Word from displaying an error message.


On Error Resume Next
FileList 1

See Also

CountFiles(), FileName$(), FileNumber, FileOpen