Chapter 2 -- 39
Reference Guide
"
""
" RecentFiles.Add
VTS_DISPATCH or RecentFile
Add(DocumentReference,
boolReadOnly).
Adds a document reference to the collection and in the File
menu.
Parameters:
DocumentReference Required VT_VARIANT or Variant
.This
reference must be unique in the collection.
boolReadOnly Optional VT_BOOL or Boolean
.If
document must be opened, it will be opened with ReadOnly
attribute.
"
""
" RecentFiles.Clear
VTS_NONE Clear.
Resets the collection and clears menu.
"
""
" RecentFiles.Item
VTS_DISPATCH or RecentFile
Item( intIndex ).
Returns a member of a collection, by position (default method).
Note
If the value provided as Index does not match any existing
member of the collection, no object is returned.
Parameters:
Index Required VT_I2 or Integer
. The index number of a
member of the collection.
The index must be a numeric expression (a number from 1 to
the value of the collection’s Count property), or a constant.
Note
If the value provided as Index doesn’t match any existing
member of the collection, an error occurs.
The Item method is the default method for collections. There-
fore, the following two lines of code are equivalent.
Object.RecentFiles(1)
Object.RecentFiles.Item(1)
Object
Methods