Newbie - Returning Directory FullName from Directory Open Dialog Box? 
Author Message
 Newbie - Returning Directory FullName from Directory Open Dialog Box?

Hi All,

Anyone have some code to share to show a Newbie how to retrieve the full
name for a directory from a Directory Open Dialog?  I want the user to be
able to select directories only and then return the full name of the
directory (complete path).

GranpaK
Email Me? You know what to do! hint - I hate spam!



Sat, 31 Aug 2002 03:00:00 GMT  
 Newbie - Returning Directory FullName from Directory Open Dialog Box?
Hi GranpaK

Three ways of doing this, in increasing levels of sophistication.

1. After the Dialog has been closed, get the value returned from the
CurDir() function.

2. Don't use the File Open dialog if all you want is a folder. try this
instead

With Dialogs(wdDialogCopyFile)
    If .Display =  -1 Then MsgBox .Directory
End With

The disadvantage of this is that the dialog always has "Copy" in the
caption, and I have not found a way of getting rid of it.

3. Go to www.mvps.com/ccrp/ and download the BrowseDialog component. This
will give you a fully customisable browse for folders dialog for which you
can set the caption, and set a whole much of other features as well.

Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email

Quote:

>Hi All,

>Anyone have some code to share to show a Newbie how to retrieve the full
>name for a directory from a Directory Open Dialog?  I want the user to be
>able to select directories only and then return the full name of the
>directory (complete path).

>GranpaK
>Email Me? You know what to do! hint - I hate spam!



Sat, 31 Aug 2002 03:00:00 GMT  
 Newbie - Returning Directory FullName from Directory Open Dialog Box?
Jonathan,

Thanks for your input.  I will try it out and report back.

GranpaK


Quote:
> Hi GranpaK

> Three ways of doing this, in increasing levels of sophistication.

> 1. After the Dialog has been closed, get the value returned from the
> CurDir() function.

> 2. Don't use the File Open dialog if all you want is a folder. try this
> instead

> With Dialogs(wdDialogCopyFile)
>     If .Display =  -1 Then MsgBox .Directory
> End With

> The disadvantage of this is that the dialog always has "Copy" in the
> caption, and I have not found a way of getting rid of it.

> 3. Go to www.mvps.com/ccrp/ and download the BrowseDialog component. This
> will give you a fully customisable browse for folders dialog for which you
> can set the caption, and set a whole much of other features as well.

> Regards
> Jonathan West - Word MVP
> MultiLinker - Automated generation of hyperlinks in Word
> Conversion to PDF & HTML
> http://www.multilinker.com
> Word FAQs at http://www.multilinker.com/wordfaq
> Please post any follow-up in the newsgroup. I do not reply to Word
questions
> by email


> >Hi All,

> >Anyone have some code to share to show a Newbie how to retrieve the full
> >name for a directory from a Directory Open Dialog?  I want the user to be
> >able to select directories only and then return the full name of the
> >directory (complete path).

> >GranpaK
> >Email Me? You know what to do! hint - I hate spam!



Sun, 01 Sep 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Select Directory dialog box like Comm Dialog Box

2. How To show only directories with Common Dialog Box for open files

3. Returning all file names from given folder directory and all sub-directories

4. Help: displaying hidden directories in directory list box

5. Selecting A Directory Using Open Common Dialog

6. COMMON DIALOG TO OPEN DIRECTORIES

7. Common Dialog Open - No Directory Change ???

8. Directory only file open dialog

9. Open-Dialog starting in "My Computer"-Directory

10. Directory Dialog Box/Form?

11. Dlg box to return directory rather than file?

12. Using Common Dialog Boxes to Get Directories

 

 
Powered by phpBB® Forum Software