PDA

View Full Version : [SOLVED:] Need help with simple syntax error



elmnas
06-04-2015, 07:34 AM
HEllo people,

I trying to generate a code that select a certain location then search for a file

I dont get my code work

Could someone help me to correct this -->




Shell "C:\Windows\explorer.exe "search-ms:displayname="findme.doc"& "C:\"", vbMaximizedFocus"




thank you in advance

elmnas
06-04-2015, 07:43 AM
this work so far but I want to add the path



Shell ("explorer.exe ""search-ms://query=test""")

SamT
06-04-2015, 08:51 AM
Have you tried DIR?

MyVar =Dir(Path & "/" & Filename)
If MyVar is Nothing Then Filename Not Found

elmnas
06-04-2015, 11:43 PM
solution :)


searchwin = "12" pathwin = "x:\xxxx\xxx\x\"
Call Shell("explorer ""search-ms://query=" & searchwin & "&crumb=location:" & pathwin & """", vbNormalFocus)

SamT
06-05-2015, 05:01 PM
Thank you for posting your solution. Others may find it helpful.