RecentFile Property

       

Returns or sets a Long that determines the number of days that a file can exist in a web (without being modified) before it appears as older in the Microsoft FrontPage reports view. For example, if the RecentFile property is set to 20, a new file or a file that has been modified will be classified as recent for the first 20 days of its existence. Files that are classified as recent appear in the Recently Added files view in the Reports view. Read/write.

expression.RecentFile

expression   Required. An expression that returns one of the objects in the Applies To list.

Example

The following example prompts the user to enter the number of days a file can exist with the classification recent, and then sets the RecentFile property to that value. The subroutine SetRecent prompts the user for input, performs a validation on the input data, converts it to the correct type and sets the RecentFile property to the new value. If the value is of an incorrect type, an error message is displayed to the user.


Sub FPRecentFile()
'Sets a value that determines how long a file can be classified recent

   Dim objApp As FrontPage.Application
   Set objApp = FrontPage.Application
   Call SetRecent(objApp)

End Sub

Sub SetRecent(ByRef objApp As Application)
'Sets the value that determines how long a file will be classified as recent
    Dim varNum As Variant
    Dim lngNum As Long
    'Prompt the user to enter a value
    varNum = InputBox("Enter the number of days a file " & _
                      "can exist before it is classified as old.")
    'Check to see that the value is of the correct type
    If IsNumeric(varNum) Then
       'If it's numeric, convert it to Long
       lngNum = CLng(varNum)
       'Set the OlderFIle value to the new value
       objApp.RecentFile = lngNum
       'Display the new setting information to the user
       MsgBox "The RecentFile value was set correctly." & vbCr & _
              "The number of days a new or modified file will be classified as recent is " _
               & lngNum & "."
    Else
       'Otherwise, display an error message to the user
       MsgBox "The input value was incorrect.", vbCritical
    End If

End Sub