Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get file in powerpoint

Status
Not open for further replies.

dgreenwo

Programmer
Jul 31, 2003
1
GB
I'm running a macro in powerpoint97 and/or 2000 and want to browse to a file, and then open it for reading.

In excel I could use -->
Application.GetOpenFilename("All files(*.*,*.*")

Is there an equivalent expression in powerpoint?

Dave
 
In Office 2002, Application.FileDialog work in all. Use "msoFileDialogFilePicker" to select files to process yourself.

Function GetFilename() As String
With Application.FileDialog(msoFileDialogFilePicker)
.ButtonName = "Save"
.Filters.Clear
.Filters.Add "all", "*.*"
.Filters.Add "text", "*.txt"
.FilterIndex = 2
If .Show = -1 Then
If .SelectedItems.Count > 0 Then
s = .SelectedItems(1)
GetFilename = s
End If
End If
End With
End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top