[VBA] Windows Search openen met zoekwaarde*

Pagina: 1
Acties:

Onderwerpen


Acties:
  • 0 Henk 'm!

Verwijderd

Topicstarter
Ik gebruik onderstaande code om het onderdeel zoeken te starten(windows verkenner).

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Option Explicit 
 'API declaration for the windows "Search Results" dialog
Private Declare Function ShellSearch& Lib "shell32.dll" _ 
Alias "ShellExecuteA" (ByVal hwnd As Long, _ 
ByVal lpOperation As String, _ 
ByVal lpFile As String, ByVal lpParameters As String, _ 
ByVal lpDirectory As String, _ 
ByVal nShowCmd As Long) 
 
Private Const SW_SHOWNORMAL = 1 
 
 
Sub ShowWindowsSearchDialog_API() 
     '   Specified drive to Search
    Const szSDrive As String = "C:\" 
     
    ShellSearch 0, "find", szSDrive, "", "", SW_SHOWNORMAL 
End Sub


Nu kan ik dus wel een map opgeven maar ik wil graag ook een te zoeken tekst aangeven. Dit lukt me alleen niet. iemand een idee?

Acties:
  • 0 Henk 'm!

  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

VBA hoort ook in Officesuites en -software, dus een klein tikje naar OFF :)

Ace of Base vs Charli XCX - All That She Boom Claps (RMT) | Clean Bandit vs Galantis - I'd Rather Be You (RMT)
You've moved up on my notch-list. You have 1 notch
I have a black belt in Kung Flu.


Acties:
  • 0 Henk 'm!

  • BtM909
  • Registratie: Juni 2000
  • Niet online

BtM909

Watch out Guys...

Wat is de derde parameter eigenlijk? ;)

Ace of Base vs Charli XCX - All That She Boom Claps (RMT) | Clean Bandit vs Galantis - I'd Rather Be You (RMT)
You've moved up on my notch-list. You have 1 notch
I have a black belt in Kung Flu.