Ian Vink

I have a function that correctly gets SpellingSuggestions from Word.

SpellingSuggestions ss = getSpellingSuggestions("applr");

Why does then this next line fail (the count is > 0)

SpellingSuggestion s = (SpellingSuggestion)ss[0];

BUT this (silly of course) code work

foreach (SpellingSuggestion s in ss)
{
retVal = s.Name;
break;
}


Re: Visual Studio Tools for Office SpellingSuggestions and SpellingSuggestion

Cindy Meister

Most collections in the Office object models are 1-based, not 0-based. If you use ss[1] does that work