Hi ppl,
I am trying to create a macro that opens a folder which contains varous types of documents and then be able to select any of the documents and have it open in its corresponding application.
An example of the folder I want to direct the user to and then the file types in the folder:
TestFolder
Word Doc1
Word Doc1
Excel Doc1
powerpoint doc1
MS project plan1
I have got the code so it opens the folder and it sucessfully opens excel documents but if i try and open any other doc type it just opens a blank workbook.
the code I'm using is as follows:
Sub OpenFolder()
ChDir "C:\IM PPM Toolkit\Project Manager\Project Folder\Agenda & Minutes\"
Filename = Application.GetOpenFileName(FileFilter:=Filt, _
FilterIndex:=FilterIndex, Title:=Title)
If Filename = False Then
Response = MsgBox("No File was selected")
Exit Sub
End If
Response = MsgBox("You selected " & Filename, vbInformation, "Proceed")
Workbooks.Open Filename
End Sub
I'm guessing it has something to do with the final line 'Workbooks.Open Filename' which looks like it is telling it to open the document in workbook format but I'm not sure how to resolve.
Can someone help.
Mnay thanks
Bookmarks