![]() |
|
|
|
#1
|
|||
|
|||
|
Hi, try this:
Code:
Sub FindPreviousMisspelledWord()
Dim rng As range
Set rng = selection.range
While rng.Start <> 0
rng.Collapse 1
rng.MoveStart wdWord, -1
If rng.SpellingErrors.Count > 0 Then
rng.SpellingErrors(1).Select
Exit Sub
End If
Wend
MsgBox "No misspelled words found."
End Sub
|
|
| Tags |
| loop, range, spell check |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Using custom style instead of inserting font attributes manually in VBA code
|
laith93 | Word VBA | 2 | 11-07-2021 12:52 AM |
| Error with macro to delete starting #) [code included] | puff | Word VBA | 1 | 04-18-2018 03:49 PM |
VBA to insert an image and centralize it (code included)
|
puff | Word VBA | 5 | 01-17-2018 04:32 PM |
Issue of 2 fixed bullet points indent setting work together (code included)
|
puff | Word VBA | 5 | 12-17-2017 05:52 PM |
| Outlook 2003 - if previous meesage included in reply, spell checks all | wildswing | Outlook | 0 | 07-22-2009 06:06 AM |