Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-09-2021, 12:34 PM
ranjan ranjan is offline Tagging Misspell words Windows 10 Tagging Misspell words Office 2019
Advanced Beginner
Tagging Misspell words
 
Join Date: May 2021
Posts: 80
ranjan is on a distinguished road
Default 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
Attached Files
File Type: docx TEST.docx (59.1 KB, 8 views)
Reply With Quote
 



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
Tagging Misspell words 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

Other Forums: Access Forums

All times are GMT -7. The time now is 11:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft