Access 2007... added a button that when pressed opens MS Word and takes the user to a specific folder to open a Word document.
Within the company I work for, operators fill out incident reports in Word and then the next shift will put those reports into a database. So on the form I've added a button that will open MS Word, but I can't get it to then open the Word dialog box to a certain folder.
Here is my code:
Private Sub cmdbtnOpenWord_Click()
Dim retVal, strPathToWord As String, strDir As String
strPathToWord = "C:\Program Files\Microsoft Office\Office12\winword.exe "
strPathToDir = "S:\ICS Computer Operations\ICS Incident Reports\2011\*.doc"
retVal = Shell(strPathToWord & strPathToDir, vbMaximizedFocus)
End Sub
It opens Word just fine, but then will not open the dialog box for Word. Anyway to do this or should I be content with it just opening Word for me? The operator still will have to choose the correct file they wish to open.