
Document(#) vs Document("Name")
Good morning Paul,
The index or the name is used to access the item in the
Documents Collection. If you have the name (which you
normally would) you don't need the index. Its usually
preferable to use the name anyway because the docs in the
collection are in no particular order (that I'm aware of)
and because of that using the index won't always return
the same document.
If there is some reason why you need the index then set up
a for loop which look for the name of each doc --
something like this:
dim i as integer
For i=1 to Documents.Count
next i
Quote:
>-----Original Message-----
>You can refer to documents by either index number
>(Documents(3)) or name (Documents("Doc3.doc")). Given an
>index, I know how to figure out the document's name, but,
>given a name, how do you figure out the document's index
>number?
>Any thoughts?
>Thanks,
>Paul
>.