Error using Word.SynonymInfo in Excel (Works in Word Doc)

  • For my specific problem, can someone explain what I can do to get similar results in MS Excel as MS Word when getting synonyms for a particular word?
    Issue: The following code for the word "onboard" results in a memory error, which is essentially the Set mySynInfo = SynonymInfo(Word:=myWord, LanguageID:=wdEnglishUS) code erroring out. If I change it to "on-board" it works. In contrast, if you enter the word in a MS Word Doc and right click the word, you get a return of synonyms. It seems that somehow, they are either separating the word in to two words, or hyphenating them.




    Thanks :)

  • Re: Error using Word.SynonymInfo in Excel (Works in Word Doc)


    I understand the question and depending on convention, it could be spelled either of the three ways. However, my issue is specifically, you can right click "onboard" within a word document and it will give you a return of similar words. However, if you run the code within Excel, developed in word, it errors. My question surrounds the fact that Word somehow incorporates additional algorithms in order to bridge the gap and provide a return on the word. I don't want to veer away from my problem, but the one of the primary reasons to attempt this is to utilize the thesaurus as a pseudo word database in order to further align, and standardize data.
    I don't have any access to a business intelligence tool with complex search algorithms, nor do I have ability to utilize the capability of a search engine to compare two different datasets.

  • Re: Error using Word.SynonymInfo in Excel (Works in Word Doc)


    Just to see, try your code with any of the following words...


    elite
    near
    tucks (That's a 'T'!!!)
    horrified


    Actually, try 'elite' first and if any issues, try 'elites'.

  • Re: Error using Word.SynonymInfo in Excel (Works in Word Doc)


    I tried all in the form which they were sent. Using my code, it failed.
    However, if I used "elites" it worked.
    Interestingly, "elite" and "elites" have different meaning, which means that they should have evoked a real response from the thesaurus.
    Again, I checked all the listed terms within a word document and 'right-clicked' them and all returned synonyms.

  • Re: Error using Word.SynonymInfo in Excel (Works in Word Doc)


    It's a bug, unfortunately...


    Word itself works fine. However, when using COM objects the bug is apparent and there's no workaround.


    It occurs when a word can be, say, either a verb or a noun, adjective, pronoun or any other part of speech (perm any 2 from an incomplete list...

  • Re: Error using Word.SynonymInfo in Excel (Works in Word Doc)


    That's unfortunate. I need a semi-intelligent search tool with a heuristic list of algorithms and my strength was going to lie in the synonym piece. I also inten to use a phonetic and lexigraphic algorithms to inplement. I need the ability to compare two datasets and see possible combinations of aligning data.

  • Re: Error using Word.SynonymInfo in Excel (Works in Word Doc)


    Any possibility of turning your project around, developing it in Word accessing Excel?


    As far as I understand, the issue is only apparent using COM to Word. It shouldn't happen if running VBA in Word (Untested, I came across the issue using Word Interop with both C# and VB).


    I find that an interesting enough suggestion to try it myself...

  • Re: Error using Word.SynonymInfo in Excel (Works in Word Doc)


    I had already tried the code in Word.. it didn't work in vba. Clarification.. It worked exactly as in Excel.


    I know this doesn't apply to the thread, but does Oracle provide and BI tools, as part of the typical package, worth looking into?

  • Re: Error using Word.SynonymInfo in Excel (Works in Word Doc)


    I understood wrong then, my apologies.


    Really sorry, but I can't help any more.


    EDIT: sorry, didn't notice the Oracle/BI Tools comment a I was using a phone at the time. Regardless, no idea, sorry.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!