Originally Posted by
hendrikbez
hi John
It is working, but (here is the but again) I do have two words "sleep and home"on different rows in my wordlist, and in tblSynonyms I have one word sleep-home.
So if I run the program it make it sleep-home to this sleep home, how can I make it to know that this two words are already in wordlist and do not add sleep home and one word.
Hi Hendrik!
In the code of the NewWordsInTableEx() function of the last attachment, add this line:
Code:
strWordsCheck = Replace(strWordsCheck, "-", " ")
between the comment:
Code:
'Also, you need a "clean-up" function here if there are special characters to remove.
and the loop:
Code:
While InStr(1, strWordsCheck, " ") > 0
So, the result at this part of code should be:
Code:
'Remove double spaces.
'Also, you need a "clean-up" function here if there are special characters to remove.
strWordsCheck = Replace(strWordsCheck, "-", " ")
While InStr(1, strWordsCheck, " ") > 0
strWordsCheck = Replace(strWordsCheck, " ", " ")
Wend
strWordsCheck = Trim(strWordsCheck)
'Escape apostrophe character.
strWordsCheck = Replace(strWordsCheck, "'", "''")
Try it and let me know if still remains the "but".
Cheers,
John