![]() |
|
#1
|
|||
|
|||
|
Hi,
Am having a macro for highlighting misspell words with a yellow color, but sometimes checking yellow colored ones also missing by overlook due to more no of tables in a document. In a document am having more than 100 tables and continously monitoring is difficult, can we automate this by tagging yellow colored line items or misspell line items with a " ## " or anyother special characters... it will be helpful for me to check only with " ## " line items and make it in a proper way. Please integrate the " ## " for the below code to highlight the misspell words. Or If any misspell word found in a cell that cell should be tagged as "##" at the beeginning of the line in a cell. I had already posted a similar one in this forum but i didnt get any responses, so i have worked something and again posting with a sample code. https://www.msofficeforums.com/word-...ell-words.html For reference PFA. Code:
Sub Highlight_Misspelled_Test()
Selection.LanguageID = wdEnglishUS
Selection.NoProofing = False
Application.CheckLanguage = True
Dim oWord As Range
Dim StoryRange As Range
Dim nTbl As Table
' Loop Through Each table
For Each nTbl In ActiveDocument.Tables
Set StoryRange = nTbl.Range
Application.CheckSpelling Word:=StoryRange
For Each oWord In StoryRange.Words
If Not Application.CheckSpelling(Word:=oWord.Text) Then
oWord.HighlightColorIndex = wdYellow
End If
Next oWord
Next
End Sub
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Misspell Words | ranjan | Word VBA | 0 | 07-19-2021 12:07 PM |
| Word to xml tagging macro | ganesang | Word VBA | 0 | 03-19-2019 04:10 AM |
Need macro for XML tagging in word doc
|
ganesang | Word VBA | 4 | 03-13-2019 02:39 AM |
| How to find (highlight) two and more words in a list of 75k single words in Word 2010 | Usora | Word | 8 | 05-29-2018 03:34 AM |
| Macro for tagging and rearranging selected text for revision | caotico | Word VBA | 0 | 03-28-2012 06:35 PM |