Billy Hill
Board Regular
- Joined
- Dec 21, 2010
- Messages
- 73
I'm making a little script to search multiple locations for the same file with different extensions.
I'm opening 3 windows to display the search results but I'd like to have more control over the windows. Currently they all stack up on top of each other and they are showing the large icons by default.
I'd like to size and position the windows and display "details" instead of large icons with sorting on Date (newest first).
Is Shell() the correct method to do this do I need to use window handles? The code I have so far is below. Any help would be greatly appreciated.
I'm opening 3 windows to display the search results but I'd like to have more control over the windows. Currently they all stack up on top of each other and they are showing the large icons by default.
I'd like to size and position the windows and display "details" instead of large icons with sorting on Date (newest first).
Is Shell() the correct method to do this do I need to use window handles? The code I have so far is below. Any help would be greatly appreciated.
Code:
Sub SearchMulti()
Dim sSearchString
'Get search string
sSearchString = InputBox("Enter search string", "Search Multi")
'Search CAM files
Call Shell("explorer.exe " & Chr(34) & "search-ms:query=*" & sSearchString & "*.vnc&crumb=location:Z:\Production\Milling\" & Chr(34), vbNormalFocus)
'Search Drawings
Call Shell("explorer.exe " & Chr(34) & "search-ms:query=*" & sSearchString & "*.pdf&crumb=location:Z:\Document Control\Customer Files\Document Masters\" & Chr(34), vbNormalFocus)
'Search CAD files
Call Shell("explorer.exe " & Chr(34) & "search-ms:query=*" & sSearchString & "*&crumb=location:Z:\Everyone\SOLID MODEL FILES\" & Chr(34), vbNormalFocus)
Last edited: