How can I delete all lower case words in an MS Word doc? Meaning all words that begin with a lower case letter.Thank you?
Printable View
How can I delete all lower case words in an MS Word doc? Meaning all words that begin with a lower case letter.Thank you?
Untested here ... change UPPER CASE letters to lower case and apply ...
https://superuser.com/questions/1576...g-find-replace
I don;t know the correct VBA for Word terminology, but basically
Code:For Each Word in AllWords
If Word = LCase(Word) Then Word.Delete
End If
Use a wildcard search for
<[a-z]{1,}>
replace with nothing
Thank you all! A few comments in case others read this:
1) I had seen that before but couldn't get it to work. One needs to check the "Use Wildcards" box for this to work
2) It doesn't work for contractions, words like "isn't" and "weren't" Is there a simple mod to the line above that would also cover words like that or words with special characters?"
You can add the character you want e.g.
<[a-z']{1,}>
See https://www.gmayor.com/replace_using_wildcards.htm
Sorry to butt in here Graham but, as I understand your suggestion <[a-z'] {1,}>, will find all lower case letters within the range a to z and the apostrophe, and replace them with nothing. Will this not also find the lower case letters of a word starting with an Upper case?