Using Explorer like window to choose a path

KAdamsInCoKAdamsInCo Member Posts: 28
I have searched the forum and found references to similar requests and they make mention of the Windows Script Host Object Model, which may do what I want, but before I go off and start researching WSHOM I wanted to know if there was a better solution to this problem or if anyone knows if this is even possible with WSHOM.

I have a field on a form that contains a directory path entered in by the user. Right now that user has to manually type in the path. I would like to have an option next to the field that launches Explorer or a 'File-Open' type dialog box where they search for the path they want, and when they find it select the path and have the path value pasted back into the field on the form.

Is there any way to do this in Nav 5?

Thanks,

Keaton

Answers

  • krikikriki Member, Moderator Posts: 9,110
    Could this be useful? : Folder Selection
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • KYDutchieKYDutchie Member Posts: 345
    Hi,

    Yes there is a way, take a look at codeunit 412 and you can use it. Or if you have Developer Studio 2005 installed, you can also use the Common dialog OCX and use the method "ShowOpen". You need Developer Studio to be able to compile your object. It might complain about not having a developer license when developer studio is not installed.

    Regards,

    Willy
    Fostering a homeless, abused child is the hardest yet most rewarding thing I have ever done.
  • KAdamsInCoKAdamsInCo Member Posts: 28
    I went with the BrowseFolder code sample and OCX control. This is the most Explorer like of the solutions that I believe users will identify with:

    http://www.mibuso.com/dlinfo.asp?FileID=169

    Thanks!
  • David_CoxDavid_Cox Member Posts: 509
    I did post an example you may want to look at using the standard CommomDialog codeunit, and just by adding a period as the filename.

    http://www.mibuso.com/forum/viewtopic.php?t=21274&highlight=

    Automation and OCx is fine but upgrades new users etc: can be a problem

    david
    Analyst Developer with over 17 years Navision, Contract Status - Busy
    Mobile: +44(0)7854 842801
    Email: david.cox@adeptris.com
    Twitter: https://twitter.com/Adeptris
    Website: http://www.adeptris.com
Sign In or Register to comment.