Michaels41
Registered User.
- Local time
- Today, 13:44
- Joined
- Feb 24, 2012
- Messages
- 18
I'm trying to open a powerpoint presentation from within my access application. I can get the dialog box to open perfectly, however, when I select a file to open, nothing happens. Here is the code:
Public Function OpenFile() As String
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = False
.Title = "Select Presentation"
.ButtonName = "Open"
.Filters.Clear
.Filters.Add "PowerPoint", "*.ppt"
'Set initial path
.InitialFileName = "P:\Safety\2012 NA Monthly Awareness Presentations\"
.InitialView = msoFileDialogViewPreview
'Show the dialog and test the return
If .Show = 0 Then
Exit Function
End If
OpenFile = Trim(.SelectedItems(1))
End With
End Function
Thanks in advance for your help.
Mike
Public Function OpenFile() As String
With Application.FileDialog(msoFileDialogFilePicker)
.AllowMultiSelect = False
.Title = "Select Presentation"
.ButtonName = "Open"
.Filters.Clear
.Filters.Add "PowerPoint", "*.ppt"
'Set initial path
.InitialFileName = "P:\Safety\2012 NA Monthly Awareness Presentations\"
.InitialView = msoFileDialogViewPreview
'Show the dialog and test the return
If .Show = 0 Then
Exit Function
End If
OpenFile = Trim(.SelectedItems(1))
End With
End Function
Thanks in advance for your help.
Mike