Reference items in Word.Application.Documents collection
Posted on 2007-04-10
I'm trying to insert text in an open word document with code called from a .net form. In an attempt to access the open document I have used:
Dim oWord As Word.Application
oWord = GetObject(, "Word.Application")
The following returns 1 when my document is open:
but this returns an error (requested collection member doesn't exist):
Why can I count items in the documents collection but not reference them by name or index?