A
avkokin
Hello.
There is code that copy all upper case words into end of document
(thank's Jean-Guy Marcil and others):
Dim rngDoc As Word.Range
Dim wu As Word.Range
Dim lngDocEnd As Long
Set rngDoc = ActiveDocument.Range
lngDocEnd = rngDoc.End
For Each wu In rngDoc.Words
If wu.Case = wdUpperCase Then
ActiveDocument.Range.InsertAfter vbCrLf & wu.Text
rngDoc.End = lngDocEnd
End If
Next wu
However if the text contains as well as single characters (upper case)
they too will copy with words. I tried to add condition of checking of
amount characters into found words (>=2) but I got too one character
and space. If I change of amount characters to 3, then word consisting
of 2 symbols will lost
Question: how to check and get only words (upper case) and How exclude
repeating words from found?
Thank you very much.
There is code that copy all upper case words into end of document
(thank's Jean-Guy Marcil and others):
Dim rngDoc As Word.Range
Dim wu As Word.Range
Dim lngDocEnd As Long
Set rngDoc = ActiveDocument.Range
lngDocEnd = rngDoc.End
For Each wu In rngDoc.Words
If wu.Case = wdUpperCase Then
ActiveDocument.Range.InsertAfter vbCrLf & wu.Text
rngDoc.End = lngDocEnd
End If
Next wu
However if the text contains as well as single characters (upper case)
they too will copy with words. I tried to add condition of checking of
amount characters into found words (>=2) but I got too one character
and space. If I change of amount characters to 3, then word consisting
of 2 symbols will lost
Question: how to check and get only words (upper case) and How exclude
repeating words from found?
Thank you very much.