I am working on an Excel97 database of clients. For each client the system creates a folder in which are stored the attendance notes etc as Word documents. The path of these folders is:
P:\Client Details\Year\Month sheet name\05_####\ where #### is the client's unique number for that year.
When a user searches for a particular client I want to create a macro to open that client's folder and then be able to open any of the word docs in it.
I have been able to do the later part with the following code:
Sub OpenWordFiles()
fileToOpen = Application.GetOpenFilename("Text Files (*.doc), *.doc")
Set wdApp = CreateObject("word.application")
wdApp.Documents _
.Open(fileToOpen, ReadOnly:=False) _
.Application.Visible = True
With wdApp
.Visible = True
.WindowState = 1
End With
wdApp.Activate
End Sub
However I don't know how to get the Open File dialoge box to have first selected the relevant folder with the required files in it.
Any help with this would be much appreciated,
Paul
Bookmarks