#1
|
|||
|
|||
Tagging Misspell words
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 |
#2
|
|||
|
|||
Hi,
Please anyone help me in this issue... your help is highly appreicated and thanks in advance.... |
#3
|
||||
|
||||
It is not fully clear what you want to do. Is this what you are looking to do?
Code:
Sub HiSpell() Dim aRng As Range, aWord As Range Set aRng = ActiveDocument.Range aRng.LanguageID = wdEnglishUS aRng.NoProofing = False For Each aWord In aRng.Words If CheckSpelling(aWord.Text) = False Then aWord.InsertBefore "##" aWord.HighlightColorIndex = wdYellow End If Next aWord End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#4
|
|||
|
|||
Thank you so much, it works exactly and your help is highly appreciated..... Once again thanks a lot....
|
Thread Tools | |
Display Modes | |
|
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 |