Copy link to clipboard
Copied
Hi team,
I am working is Medical based text jobs in english where I have so many medical words which not usually present in User dictionary. so it will shown as dynamic spell error.
To rectify this I whould like to collect all dynamic spell error words later I will add all in dictionary.
I tried the below script, its not working
// InDesign ExtendScript to collect misspelled words
// Access the active document
var doc = app.activeDocument;
// Check if there are any misspelled words
if (doc.spellingErrors.length > 0) {
var misspelledWords = [];
// Iterate through each misspelled word
for (var i = 0; i < doc.spellingErrors.length; i++) {
var error = doc.spellingErrors[i];
var misspelledWord = error.contents;
// Add the misspelled word to the array
misspelledWords.push(misspelledWord);
}
// Output the collected misspelled words
alert("Misspelled Words: \n" + misspelledWords.join(", "));
} else {
alert("No misspelled words found in the document.");
}
Please give some idea to achive the task.
Regards
Nousheeth
Copy link to clipboard
Copied
Rookie responding, so please be kind if this is totaly incorrect 🙂
Might this line:
misspelledWords.push(misspelledWord);
need to be modified as
misspelledWords.push($misspelledWord);
to insert the word as a text string?
Copy link to clipboard
Copied
The document object doesn't have the property spellingErrors. Is it maybe part of a scriptable plug-in that you installed? Did you write the script yourself?
P.
Copy link to clipboard
Copied
HI Peter kahrel,
I got this from a facebook community friend but its not working, and I'm Unable to reach them back.
kindly letme know if any other option to achive my task
Copy link to clipboard
Copied
This may not address any of your needs or interests, but be aware that one spell-checking 'language' is USA Medical. (There's also a USA Legal.)
Copy link to clipboard
Copied
@Nousheeth -- Did you see James's comment about the US medical word list?