Function Read_NameList() As Object
' 读取桌面TXT名单
Dim FileName As String
Set NameListDic = CreateObject("Scripting.Dictionary")
FileName = "D:\Desktop\NameList.txt"
Open FileName For Input As #1 ' 作为输入引入
Do While Not EOF(1) ' 判断文件终止
On Error Resume Next
Line Input #1, nextline
oneline = Split(nextline, ",")
If NameListDic.exists(oneline(0)) = False Then
NameListDic.Add oneline(0), oneline(1)
End If
Rem d.Add oneline(0), oneline(1)
Loop
Close #1
Set Read_NameList = NameListDic
End Function