Upravit

Sdílet prostřednictvím


FileDialog Interface

Definition

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

public interface class FileDialog : Microsoft::Office::Core::_IMsoDispObj
[System.Runtime.InteropServices.Guid("000C0362-0000-0000-C000-000000000046")]
public interface FileDialog : Microsoft.Office.Core._IMsoDispObj
[<System.Runtime.InteropServices.Guid("000C0362-0000-0000-C000-000000000046")>]
type FileDialog = interface
    interface _IMsoDispObj
Public Interface FileDialog
Implements _IMsoDispObj
Attributes
Implements

Remarks

With the dialog boxes this object provides, users of your solutions can easily specify the files and folders that your solution should use.

Use the FileDialog property to return a FileDialog object. The FileDialog property is located in each individual Office application's Application object. The property takes a single argument, DialogType, that determines the type of FileDialog object that the property returns. There are four types of FileDialog objects:

Each host application can only instantiate a single instance of the FileDialog object. Therefore, many of the properties of the FileDialog object persist even when you create multiple FileDialog objects. Therefore, make sure that you've set all of the properties appropriately for your purpose before you display the dialog box.

In order to display a file dialog box using the FileDialog object, you must use the Show() method. Once a dialog box is displayed, no code will execute until the user dismisses the dialog box.

Properties

AllowMultiSelect

Determines if the user is allowed to select multiple files from a file dialog box.

Application

Returns an Application object that represents the container application for the object.

ButtonName

Returns or sets a String representing the text that is displayed on the action button of a file dialog box.

Creator

Returns a 32-bit integer that indicates the application in which the specified object was created.

DialogType

Returns an MsoFileDialogType constant representing the type of file dialog box that the FileDialog object is set to display.

FilterIndex

Returns or sets an Integer indicating the default file filter of a file dialog box.

Filters

Returns a FileDialogFilters collection.

InitialFileName

Returns or sets a String representing the path and/or file name that is initially displayed in a file dialog box.

InitialView

Returns or sets a MsoFileDialogView constant representing the initial presentation of files and folders in a file dialog box.

Item

Returns the text associated with an object.

Parent

Returns the Parent object for the specified object.

SelectedItems

Returns a FileDialogSelectedItems collection.

Title

Returns or sets the title of a file dialog box displayed using the FileDialog object.

Methods

Execute()

Runs the procedure or built-in command assigned to the specified command bar control.

Show()

Displays a file dialog box and returns an Integer indicating whether the user pressed the action button (-1) or the cancel button (0).

Applies to