0
我知道如何獲取單詞文檔中的每個段落。但我正在尋找一種方法來循環訪問MS Word文檔中的每個單詞。如何遍歷word文檔中的每個單詞 - VBA宏
Sub Sample()
Dim apara As Paragraph
Dim lineText As String
For Each apara In ActiveDocument.Paragraphs
lineText = apara.Range
'Now print the paragraph
Debug.Print lineText
Next apara
End Sub
你試過[這](http://msgroups.net/microsoft.public.word.vba.general/looping-through-every-word/68673)? –