Application.FileDialog property (Word)

Returns a FileDialog object which represents a single instance of a file dialog box.


expression. FileDialog( _FileDialogType_ )

expression Required. A variable that represents an Application object.


Name Required/Optional Data type Description
FileDialogType Required MsoFileDialogType The type of dialog.


This example displays the Save As dialog box.

Sub ShowSaveAsDialog() 
 Dim dlgSaveAs As FileDialog 
 Set dlgSaveAs = Application.FileDialog( _ 
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( _ 
 With dlgOpen 
 .AllowMultiSelect = True 
 End With 
End Sub

See also

Application Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.