|
试试:
- Sub test()
- Dim lngCount As Long, lngIndex As Long
- Dim strTemp As String
- Dim strText As String, arrKeys As Variant, strResult As String
- Dim objDic As Object
-
- Set objDic = CreateObject("Scripting.Dictionary")
- lngCount = ThisDocument.Characters.Count
- strTemp = ThisDocument.Content
- For lngIndex = 1 To lngCount
- strText = Trim(Mid(strTemp, lngIndex, 1))
- If strTemp <> "" Then objDic(strText) = ""
- Next
-
- arrKeys = objDic.keys
-
- strResult = Join(arrKeys, "")
-
- ThisDocument.Content = strResult
- MsgBox "OK"
- End Sub
复制代码 |
评分
-
1
查看全部评分
-
|