Add Method (RecentFiles Collection)

Applies To

RecentFiles collection object.

Description

Adds a file to the list of recently used files. Returns a RecentFile object.

Syntax

object.Add(Name)

object Required. An expression that returns a RecentFiles object.

Name Required String. The file name.

Example

This example adds "Oscar.xls" to the list of recently used files.

Application.RecentFiles.Add Name:="oscar.xls"