Previous Document Next Document

Object Model Reference : Classes : R : RecentFiles : Properties : RecentFiles.Item


RecentFiles.Item

Property Item(Index As Long) As RecentFile

Description

Member of RecentFiles

The Item property returns the specified RecentFile object.

Item is the default property of the RecentFiles class, and its reference can be omitted when you are accessing items in a RecentFiles collection. For example, RecentFiles.Item(2) is the same as RecentFiles(2) — they both reference the second RecentFile object in the collection.

The Item property returns a read-only value.

Parameter
Description
Index
Specifies the preset placeholder that uniquely identifies each member of the RecentFiles collection

VBA example

The following VBA example displays the list of most recently used files and their paths.

Sub Test()
 Dim rf As RecentFile, s As String, i As Long
 s = "Most Recently Used files:"
 For i = 1 To RecentFiles.Count
  Set rf = RecentFiles(i)
  s = s & vbCr & rf.Name & vbTab & rf.Path
 Next i
 MsgBox s
End Sub
Sub Test()
 Dim rf As RecentFile, s As String
 s = "Most Recently Used files:"
 For Each rf In RecentFiles
  s = s & vbCr & rf.Name & vbTab & rf.Path
 Next rf
 MsgBox s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.