Solved: Bringing a list of available templates
Hi,
I've got various folders that belong to various locations that contain Word documents and templates that are used to create other documents.
I'm trying to make all these documents available on a userform that can easily be picked up and a new document be created. I've thought of various techniques to bringing this about, however, I fail to think of a logic to display these files.
I tried one of Word's examples of FileSearch, but the example itself doesn't seem to work.
The example I have tried to use is the following:
[VBA] Sub trial1()
With Application.FileSearch
.FileName = "*.doc"
.LookIn = "C:\Templates\Buffalo"
.Execute
For I = 1 To .FoundFiles.Count
MsgBox .FoundFiles(I)
Next I
End With
End Sub[/VBA]
The problem with this code is that the LookIn variable doesn't change even though it has been set by the example to the one mentioned. I've tried using an alternate variable, but it still uses the system default. Is there a workaround for this problem.
I am using Office 97 with Win 2000.
Any help is appreciated.
Thanks.:think: