Created
May 21, 2014 03:28
-
-
Save kumatti1/9533c4833a1faf62478b 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 | |
Private WithEvents d As Shell32.ShellFolderViewOC | |
Private WithEvents ie As SHDocVw.InternetExplorer | |
Private flg As Boolean | |
Private Sub d_EnumDone() | |
flg = True | |
Debug.Print "d_EnumDone" | |
End Sub | |
Private Sub ie_DocumentComplete(ByVal pDisp As Object, URL As Variant) | |
d.SetFolderView ie.Document | |
End Sub | |
Private Sub UserForm_Initialize() | |
Set d = New Shell32.ShellFolderViewOC | |
flg = False | |
Dim o | |
Dim v | |
Dim Shl As Shell32.Shell | |
Dim Win As InternetExplorer | |
Dim h As Long | |
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 ie = Win | |
Dim doc As IShellFolderViewDual3 | |
Set doc = ie.Document | |
doc.FilterView "hoge" | |
Do | |
DoEvents | |
Loop Until flg = True | |
Set o = doc.Folder.Items | |
For Each v In o | |
Debug.Print v.Path | |
Next | |
Exit For | |
End If | |
End If | |
Next | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment