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?
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
For Each Word in AllWords If Word = LCase(Word) Then Word.Delete End If
I expect the student to do their homework and find all the errrors I leeve in.
Please take the time to read the Forum FAQ
Use a wildcard search for
<[a-z]{1,}>
replace with nothing
Graham Mayor - MS MVP (Word) 2002-2019
Visit my web site for more programming tips and ready made processes
http://www.gmayor.com
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
Graham Mayor - MS MVP (Word) 2002-2019
Visit my web site for more programming tips and ready made processes
http://www.gmayor.com
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?
Remember To Do the Following....
Use tags when posting code to the thread,
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link