Document(#) vs Document("Name") 
Author Message
 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

>-----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

>Any thoughts?



Sun, 21 Nov 2004 03:51:17 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Document(#) vs Document("Name")

2. Re-naming "My Documents"

3. "document name or path is invalid"

4. Document name includes "- for merge"

5. Documents in "Activities" tab

6. Opinions "MS Office Document Imaging"?

7. Change location of "My Documents"

8. "Document Not Saved" - Microsoft Warning Message

9. path to "My Documents"

10. ExecuteExcel4Macro("GET.DOCUMENT(50)");Count Page

Powered by phpBB® Forum Software © phpBB Group