Share via


FileDialog Members (Office)

Provides file dialog box functionality similar to the functionality of the standard <ui>Open</ui> and <ui>Save</ui> dialog boxes found in Microsoft Office applications.

Methods

Name

Description

Execute

Carries out a user's action right after the Show method is invoked.

Show

Displays a file dialog box and returns a Long indicating whether the user pressed the Action button (-1) or the Cancel button (0). When you call the Show method, no more code executes until the user dismisses the file dialog box. In the case of Open and SaveAs dialog boxes, use the Execute method right after the Show method to carry out the user's action.

Properties

Name

Description

AllowMultiSelect

Is True if the user is allowed to select multiple files from a file dialog box. Read/write.

Application

Gets an Application object that represents the container application for the FileDialog object (you can use this property with an Automation object to return that object's container application). Read-only.

ButtonName

Sets or gets a String representing the text that is displayed on the action button of a file dialog box. Read/write.

Creator

Gets a 32-bit integer that indicates the application in which the FileDialog object was created. Read-only.

DialogType

Gets an MsoFileDialogType constant representing the type of file dialog box that the FileDialog object is set to display. Read-only.

FilterIndex

Gets or sets a Long indicating the default file filter of a file dialog box. The default filter determines which types of files are displayed when the file dialog box is first opened. Read/write.

Filters

Gets a FileDialogFilters collection. Read-only.

InitialFileName

Set or returns a String representing the path or file name that is initially displayed in a file dialog box. Read/write.

InitialView

Gets or sets an MsoFileDialogView constant representing the initial presentation of files and folders in a file dialog box. Read/write.

Item

Gets the text associated with an object. Read-only.

Parent

Gets the Parent object for the FileDialog object. Read-only.

SelectedItems

Gets a FileDialogSelectedItems collection. This collection contains a list of the paths of the files that a user selected from a file dialog box displayed using the Show method of the FileDialog object. Read-only.

Title

Sets or gets the title of a file dialog box displayed using the FileDialog object. Read/write.