Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #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: 76
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, 6 views)
Reply With Quote
  #2  
Old 08-17-2021, 08:19 AM
ranjan ranjan is offline Tagging Misspell words Windows 10 Tagging Misspell words Office 2019
Advanced Beginner
Tagging Misspell words
 
Join Date: May 2021
Posts: 76
ranjan is on a distinguished road
Default

Hi,

Please anyone help me in this issue...

your help is highly appreicated and thanks in advance....
Reply With Quote
  #3  
Old 08-17-2021, 04:50 PM
Guessed's Avatar
Guessed Guessed is offline Tagging Misspell words Windows 10 Tagging Misspell words Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

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
Reply With Quote
  #4  
Old 08-18-2021, 06:02 AM
ranjan ranjan is offline Tagging Misspell words Windows 10 Tagging Misspell words Office 2019
Advanced Beginner
Tagging Misspell words
 
Join Date: May 2021
Posts: 76
ranjan is on a distinguished road
Default

Thank you so much, it works exactly and your help is highly appreciated..... Once again thanks a lot....
Reply With Quote
Reply

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
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 09:37 AM.


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