Previous Document Next Document
RecentFiles.Item

Property Item(Index As Long) As RecentFile

Member of RecentFiles

The Item property returns the specified RecentFile object.

The Item property is the default property and its reference can be omitted when accessing an item in the collection. For example, RecentFiles.Item(2) is the same as RecentFiles(2) — they both reference the second RecentFile in the RecentFiles collection.

The Item property returns a read-only value.

Parameters
Description
Index
Acts a preset placeholder for each object in a RecentFiles collection, uniquely identifying each member of the collection

The following code example displays the list of all 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 2007 Corel Corporation. All rights reserved.