Office 2000 PIAs - can't index Fields or Paragraphs

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: David Thielen (thielen_at_nospam.nospam)
Date: 11/22/04


Date: Mon, 22 Nov 2004 08:43:01 -0800

Hi;

I built the Word 2000 PIAs and everything in my add-in builds fine (I had
the change some events from event3 to event2) EXCEPT:

Field fld = range.Fields[ind];
gets:
C:\src\AutoTag\AutoTag2000\Framework.cs(1402): Cannot apply indexing with []
to an expression of type 'Microsoft.Office.Interop.Word.Fields'

- and -

Range range = ThisApplication.Selection.Range.Paragraphs[1].Range;
gets:
C:\src\AutoTag\AutoTag2000\Framework.cs(1493): Cannot apply indexing with []
to an expression of type 'Microsoft.Office.Interop.Word.Paragraphs'

The object browser shows a this[int] member for each - but the Fields it
doesn't show any return info and for Paragraphs it shows it returning an int.

How do I access a field and paragraph by index in Word 2000?

thanks - dave

-- 
thanks - dave