Closed Thread
Results 1 to 8 of 8

VBA Using Windows Desktop Search

  1. #1
    Registered User
    Join Date
    12-14-2012
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    14

    VBA Using Windows Desktop Search

    Hi All,

    Can someone help if possible?

    I would like to be able to call a windows 7 desktop search from VBA and pass search and path parameters to the query.

    I can issue the commands separately

    This will bring up a Win7 Desktop search with Search Word searchwin set

    searchwin = "SO6515"
    Call Shell("explorer ""search-ms://query=" & searchwin, vbNormalFocus)

    This will bring up Win7 Desktop search with Path Parameter pathwin set

    pathwin = "C:\Bulletins"
    Call Shell("explorer " & pathwin, vbNormalFocus)


    but I cant find a way to combine both the Search term and Path in one query

    I would like something on the lines of

    searchwin = "SO6515"
    pathwin = "C:\Bulletins"
    Call Shell("explorer " this path pathwin and this search term searchwin )

    Is this possible or is there an alternative I can use from VBA as I want to assign this to a button.

    Appreciate any help.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA Using Windows Desktop Search

    perhaps
    Please Login or Register  to view this content.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    12-14-2012
    Location
    uk
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: VBA Using Windows Desktop Search

    Hi JosephP,

    I cant thank you enough I was experimenting and searching for practically 2-3 hours and no where did I find the "&crumb=location:" keyword that you added. Where do you know something like that, lol.

    Brilliant, worked perfectly!!

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VBA Using Windows Desktop Search

    you're welcome :-)

  5. #5
    Registered User
    Join Date
    08-16-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: VBA Using Windows Desktop Search

    This is the code which i can't use in windows xp.
    Could you please tell me for windows xp?

  6. #6
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: VBA Using Windows Desktop Search

    @sivaduraikumar,
    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ben Van Johnson

  7. #7
    Registered User
    Join Date
    08-10-2012
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: VBA Using Windows Desktop Search

    Quote Originally Posted by JosephP View Post
    perhaps
    Please Login or Register  to view this content.
    Could you please help with How do I create Hyperlink to the location of the Searcched file ?

  8. #8
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: VBA Using Windows Desktop Search

    Welcome to the forum.

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Windows 7 :web page on desktop
    By faddies in forum Microsoft Windows Help
    Replies: 1
    Last Post: 07-23-2012, 04:10 AM
  2. Windows 7 :Remote Desktop Home PC from My Wireless
    By Mordred in forum Microsoft Windows Help
    Replies: 19
    Last Post: 07-23-2012, 12:06 AM
  3. Need a Macro in Excel to change desktop picture in MS Windows 7.
    By cRtoloss in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2012, 02:34 AM
  4. Windows XP : How can i hide windows version on the Desktop
    By Reema in forum Microsoft Windows Help
    Replies: 4
    Last Post: 11-27-2009, 04:47 PM
  5. [SOLVED] Google desktop search and Excel password prompt
    By Bob Flanagan in forum Excel General
    Replies: 0
    Last Post: 01-05-2005, 05:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1