File Dialog Open

Hello,

Using the API we can open the File Dialog box . That’s fine . But can I directly open the Folder (eg H:/UK Shared data/HR/Shared/T&C/Live_Import_Export/PGS/ ) and it shows me the files in it.

I’m picking up the path from a profile document , as its going to remain contant throughout.

Idea is to avoid the user to go through all the folder and then select the file for importing the data.

Any suggestions , pleas let me know.

Thanks

Tom

Subject: File Dialog Open

You can use notesuiworkspace.OpenFileDialog and specify the initial directory there.

Hope that helps

Ben

Subject: RE: File Dialog Open

Hello,

Tried , but that’s also opening the default folder , in my case Desktop , but not taking the one which I’m passing through the code.

Is there any limitaion for the number of folder tree .

Thanks

Tom

Subject: RE: File Dialog Open

Thomas,

I just created this Dialog:

Dim ws As New NotesUIWorkspace

ws.OpenFileDialog False, “Test Dialog”, “Test Files| *.txt”, “C:\Temp”, “test.txt”

Which took me to my c:\temp dir and pre-selected test.txt (which I created specifically for this purpose)

Doe your dialog call look like mine above? Are you specifying all of the method properties? Can you get the property to work effectively with a shorter path? The only thing I can think of are the spaces in your path. I am not sure how notes handles those, you may try using the DOS path w/ the ~ character and see if that works.

The one thing that your path does have specified incorrectly in your example is teh slash should be a backslash '' instead of a forward slash ‘/’.

Shawn

Subject: RE: File Dialog Open

Hi Shawn,

Thanks for your response and advice. I’m getting the path from a profile document , as its going to remain same and even if the user cnages they’ll modify the profile document .

I’m now able to open the desired folder (with spaces in the folder names) , but when I select the File , it gives me Type Mismatch error .

I’m working on it . This should also get resolved…:-))

Thanks for all ur responses.

cheers

Tom

Subject: File Dialog Open

Thomas,

If you are opening a notes DB you should be able to use the session.getDatabase() method to open it. If you are opening a file you can set the path as your constant and specify that as your third optional method property for the OpenFileDialog.

Search designer help for OpenFileDialog.

Shawn