-Hiii can u plz help me for code?
-I want to Extract the wrong spell word from Paragraph in Word File.
-Can u plz help me for to create VB Script for that .
-so that VB Code i can use in Invoke Code activity.
-In one folder there are 3 word documents . i want to extract the wrong spell words from this all doc. and paste into diff. text doc respectively.
-The Word Doc. as follows.
1 Like
Hi,
Try below vb code:-
Dim wordApp
Set wordApp = GetObject(,“Word.Application”)
wordApp.Visible = True 'Optional, to make Word visible
Dim doc
Set doc = wordApp.ActiveDocument
Dim range
Set range = doc.Content
Dim words
Set words = range.Words
Dim spellChecker
Set spellChecker = wordApp.Application.CheckSpelling
Dim misspelledWords
misspelledWords = “”
For Each word In words
If Not spellChecker.CheckSpelling(word.Text) Then
misspelledWords = misspelledWords & word.Text & vbCrLf
End If
Next
MsgBox “Misspelled words:” & vbCrLf & misspelledWords
Thanks
1 Like