Upravit

Sdílet prostřednictvím


ScopeFolder Interface

Definition

Corresponds to a searchable folder.

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

Remarks

ScopeFolder objects are intended for use with the SearchFolders collection. The SearchFolders collection defines the folders that are searched when using the FileSearch object. When you want to search specific folders, you can use the methods and properties of the SearchScope object and the ScopeFolders collection to retrieve ScopeFolder objects and add them to the SearchFolders collection.

Use the ScopeFolder property of the SearchScope object to return the root ScopeFolder object of a search scope.

Use the Item[Int32] method of the ScopeFolders collection to return a subfolder of a root ScopeFolder object, or a folder that will be searched the next time the Execute(MsoSortBy, MsoSortOrder, Boolean) method of the FileSearch object is called.

In each ScopeFolder object there is a ScopeFolders collection that contains the subfolders of the parent ScopeFolder object. You can traverse the entire folder structure of a search scope (for example, all local drives) by looping through these ScopeFolders collections and returning all of the lower-level ScopeFolder objects. A ScopeFolder object with no subfolders contains an empty ScopeFolders collection.

You can use the Add(ScopeFolder) method of the SearchFolders collection to add a ScopeFolder object to the SearchFolders collection; however, it is usually simpler to use the AddToSearchFolders() method of the ScopeFolder that you want to add, because there is only one SearchFolders collection for all searches.

Properties

Application

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

Creator

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

Name

Returns the name of the specified object.

Path

Returns a String indicating the full path of a ScopeFolder object.

ScopeFolders

Returns a ScopeFolders collection.

Methods

AddToSearchFolders()

Adds a ScopeFolder object the SearchFolders collection.

Applies to