>i am using ?office 97 upwards.
>
[quoted text clipped - 15 lines]
>
> next document
Thanks,
i have tried this and altered the folder path to suit, it finds the first
file and then debugs on the 'set pDoc = Documents.Open(pFileName)' line with
a run-time rror 5174 'this file could not be found'.
Try one of the following
Check spelling of the document
Try a different filename
Equally when I change the path to 'R' drive (a network drive) it doesn't
find anything and end subs.
Any ideas?

Signature
Mark
> Dim pFileName as string
> Dim pDoc as Word.Document
[quoted text clipped - 26 lines]
> >
> > next document
Doug Robbins - Word MVP - 31 Mar 2006 15:41 GMT
You need to use:
Dim pFileName As String
Dim pDoc As Word.Document
pFileName = Dir("C:\MyFolder\*.doc")
Do Until Len(pFileName) = 0
MsgBox pFileName
Set pDoc = Documents.Open("C:\MyFolder\" & pFileName)
pFileName = Dir
Loop

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Thanks,
>
[quoted text clipped - 42 lines]
>> >
>> > next document