+ Reply to Thread
Results 1 to 4 of 4

Advanced use with Shell command

  1. #1
    Registered User
    Join Date
    08-04-2011
    Location
    Bethlehem, PA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Advanced use with Shell command

    Hi All, I have run into a problem using the shell command with VBA on a userform.

    I need to open a explorer window and navigate to our document management software.

    Please Login or Register  to view this content.
    This does not work. It will open the explorer window but only show the "my documents" folder.

    the problem is "documentum\Custom Query\xyz_prod_doc" is not a physical address.
    I can use the shell command to open any physical address (aka, C:\temp) with no problems.

    When explorer is open, we typically paste "documentum\Custom Query\xyz_prod_doc" into the address bar and then hit enter. My goal is to replicate this with VBA, and if i can get that far, I'd like to pre-populate a sql query from the VBA as well to automate some document searching. (So I am also interested in passing other information to the explorer window)

    Essentially, i need to replicate opening explorer, pasting a address, (as i don't seem to be able to pass it with shell), and hitting enter, to start.

    Thanks for any suggestions or ideas.
    Last edited by Hoots711; 08-04-2011 at 01:48 PM.

  2. #2
    Valued Forum Contributor Steffen Thomsen's Avatar
    Join Date
    10-15-2010
    Location
    Kolding, Denmark
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    953

    Re: Advanced use with Shell command

    Hi,

    Why not connect directly to the sql database and make the query, you can do that with an ADODB.connection threw vba.

    Steffen Thomsen

  3. #3
    Registered User
    Join Date
    08-04-2011
    Location
    Bethlehem, PA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Advanced use with Shell command

    Quote Originally Posted by Steffen Thomsen View Post
    Hi,

    Why not connect directly to the sql database and make the query, you can do that with an ADODB.connection threw vba.

    Steffen Thomsen
    I don't believe that is an option as this is a global document manage custom software. Trying to get any type of permissions (or even information) from our global IT is like beating your head against a wall.

  4. #4
    Registered User
    Join Date
    08-04-2011
    Location
    Bethlehem, PA
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Advanced use with Shell command

    I found a work around, but it is very sloppy...

    fnwait is a "pause/sleep" function with seconds being passed to it.
    Then with sendkeys I simulate Tab,Enter,Paste,Enter, Paste, Enter while changing the clipboard's contents as needed.

    This will do what i want, but I wonder if anyone has any other ideas? I need the sleep functions for the machine to catch up with the code... Like I said, very sloppy.

    Thoughts?
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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