Table of contents
TOC
Collapse the table of content
Expand the table of content

Application.FileDialog Property (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Returns a FileDialog object that represents a single instance of a file dialog box. Read-only.

Syntax

expression. FileDialog( Type )

expression A variable that represents an Application object.

Parameters

NameRequired/OptionalData TypeDescription
TypeRequiredMsoFileDialogTypeThe type of dialog to return.

Return Value

FileDialog

Remarks

The value of the Type parameter can be one of these MsoFileDialogType constants.

|| |:-----| |msoFileDialogFilePicker| |msoFileDialogFolderPicker| |msoFileDialogOpen| |msoFileDialogSaveAs|

Example

This example displays the Save As dialog box.

Sub ShowSaveAsDialog()

    Dim dlgSaveAs As FileDialog

    Set dlgSaveAs = Application.FileDialog( _
        Type:=msoFileDialogSaveAs)

    dlgSaveAs.Show

End Sub

This example displays the Open dialog box and allows a user to select multiple files to open.

Sub ShowFileDialog()

    Dim dlgOpen As FileDialog

    Set dlgOpen = Application.FileDialog( _
        Type:=msoFileDialogOpen)

    With dlgOpen
        .AllowMultiSelect = True
        .Show
    End With

End Sub

See also

Concepts

Application Object

© 2018 Microsoft