All replies

Please show a larger segment of code, including the code that's triggering the error message and your declaration of the object WordApp. The code you show us won't trigger an error concerning ActiveDocument.

Cindy, your code does work for me, in Word 2007 (English US only) on Windows XP. Tonight I can try it in Word 2007 on Windows 7 Ultimate and post back. I wonder, though, whether the problem might be related to having more than one language enabled, which
I don't have.

BTW, adding the line

If suggestions.Count Then Debug.Print suggestions(1).Name

prints the word 'case'.

Cindy Meister wrote:

Hi Sweety

FWIW I haven't been able to get GetSpellingSuggestions to work at all
in Word 2007, not even with Word's native VBA. The following test,
for example, throws the error

"Cannot find proofing tools for" followed by three unicode symbols,
the first of which is an upwards pointing arrow, the other two
undefinable.

<<Cindy, your code does work for me, in Word 2007 (English US only) on Windows XP. Tonight I can try it in Word 2007 on Windows 7 Ultimate and post back. I wonder, though, whether the problem might be related to having more than one language enabled,
which I don't have.>>

that's very interesting...

I tested this already a couple of months ago, Win7 & Office 10, all German. Got the same error
when I specified a dicationary. It worked (then) asking for just the suggestions, without giving any parameters. But not so today.

My test environment today was Windows Vista and Office 2007, the US English versions. But as you know, I do have multiple languages activated.

I know this used to work, because I worked through it with someone a couple of years ago in one of the office.developer newsgroups. And I kept an extract of the final solution. But seeing those weird (unicode, I assume) characters in the error message...
<GAGH>

It's OK here on Word 2007+Vista (32 bit) with my normal primary editing language (English UK), French and Spanish (which I think are the three languages provided with proofing tools as standard for this edition. The other languages I've tried, including
German (Germany) will cause the same error that Cindy is seeing.

BTW, if you feel compelled to mess around with your editing languages, don't forget to save your normal.dotm as Word will create a new one.

I got the same error that sweety reported in the following line of my code:

_word = new Microsoft.Office.Interop.Word.Application();

Even though the exception is not caught i can see inside _word that an exception was thrown ...this exception makes my AddIn to not load anymore since i can see the registry key LoadBehavior = 2 ...any ideas? Tried to clean the references and add them again
but nothing, I am working on Word 2007 in a 64 bits Vista pc. Any help would be helpful