ScopeFolder.Path プロパティ (Office)
ScopeFolder オブジェクトの完全なパスを示す String を取得します。 読み取り専用です。
構文
式。パス
式ScopeFolder オブジェクトを表す変数。
例
次の例では、[マイ コンピューター] の各ディレクトリのルート パスを表示します。 この情報を取得するため、最初に [マイ コンピューター] のルートで ScopeFolder オブジェクトを取得します。 この ScopeFolder のパスは、常に "*" になります。 すべての ScopeFolder オブジェクトと同様に、このルート オブジェクトには ScopeFolders コレクションが含まれています。 この例では、この ScopeFolders コレクションを用いてループし、各 ScopeFolder オブジェクトのパスを表示します。 これらの ScopeFolder オブジェクトのパスは、、C:\
、などになりますA:\
。
Sub DisplayRootScopeFolders()
'Declare variables that reference a
'SearchScope and a ScopeFolder object.
Dim ss As SearchScope
Dim sf As ScopeFolder
'Loop through the SearchScopes collection
'and display all of the root ScopeFolders collections in
'the My Computer scope.
For Each ss In SearchScopes
Select Case ss.Type
Case msoSearchInMyComputer
'Loop through each ScopeFolder collections in
'the ScopeFolders collection of the
'SearchScope object and display the path.
For Each sf In ss.ScopeFolder.ScopeFolders
MsgBox "Path: " & sf.Path
Next sf
Case Else
End Select
Next ss
End Sub
関連項目
サポートとフィードバック
Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示