The "file" menu at the bottom of the Word lists the recently used file names and paths. The file names and paths will change with the user's usage, this is in line with the principle that "recently used" is most likely to be "frequently used" in statistics, facilitating users and improving efficiency. There are many implementation methods. I will give you an example for your reference.
1. Create a LastFile. Ini file in the working directory. The total number of historical files with the first action is as follows: the full path of historical files. Of course, you can also use data table storage, which makes programming easier.
The content of the LastFile. Ini file is as follows: 4
"D: Program instance slzjslzj source code 2004.11.18 water cost example. mdb"
"C: WINDOWSDesktop111111.mdb"
"D: Program instance slzjslzj source code 2004.11.18 water cost example. mdb"
"D: Program instance slzjslzj source code 2004.11.32004.11.32004.11.32004.11.3 example (review). mdb"
2. Compile the following code in Form_Load to display historical files in the File menu.
******************* ********
'Operation if the configuration file does not exist.
If Dir (App. Path & "lastfile. ini") = "" Then
Open App. Path & "lastfile. ini" For Output As #1
Write #1, 0
Close #1
End If
'Open the lastfile. Ini file.
Open App. Path & "lastfile. ini" For Input As #1
Dim strLastfile2 As String
'Get the number of historical files
Line Input #1, strLastfile2
IMaxLastfile = Int (strLastfile2)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.