Created
May 19, 2014 22:34
-
-
Save kumatti1/f35af1fba2f822091bbb to your computer and use it in GitHub Desktop.
エクスプローラでのパス列挙
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Sub hoge3() | |
Dim o As Shell32.FolderItems3 | |
Dim v As Shell32.FolderItem2 | |
Dim Shl As Shell32.Shell | |
Dim Win As InternetExplorer | |
Const StrPath As String = "C:\Temp" | |
Set Shl = New Shell32.Shell | |
For Each Win In Shl.Windows | |
If Win.FullName Like "*\Explorer.EXE" Then | |
If Win.document.Folder.Self.Path = (StrPath) Then | |
Set o = Win.document.Folder.Items | |
Exit For | |
End If | |
End If | |
Next | |
For Each v In o | |
' Debug.Print TypeName(v) | |
Debug.Print v.Path | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment