Maximum Property

Microsoft Word Visual Basic

Returns or sets the maximum number of recently used files that can appear on the File menu. Can be a number from 0 (zero) through 9. Read/write Long.

expression.Maximum

expression    Required. An expression that returns a RecentFiles object.

ShowMaximum property as it applies to the Dictionaries and HangulHanjaConversionDictionaries objects.

Returns the maximum number of custom or conversion dictionaries allowed. Read-only Long.

expression.Maximum

expression    Required. An expression that returns one of the above objects.

Example

ShowAs it applies to the RecentFiles object.

This example disables the list of most recently used files.

RecentFiles.Maximum = 0
				

This example increases the number of items on the list of most recently used files by 1.

num = RecentFiles.Maximum
If num <> 9 Then RecentFiles.Maximum = num + 1
				

ShowAs it applies to the Dictionaries and HangulHanjaConversionDictionaries objects.

This example displays a message if the number of custom dictionaries is equal to the maximum number allowed. If the maximum number hasn't been reached, a custom dictionary named "MyDictionary.dic" is added.

If CustomDictionaries.Count = CustomDictionaries.Maximum Then
    MsgBox "Cannot add another dictionary file"
Else
    CustomDictionaries.Add "MyDictionary.dic"
End If