Display Dialog to find file name & path 
Author Message
 Display Dialog to find file name & path

How do I use a dialog box to find a file?

I have tried  several things. I have tried wdDialogFileFind. I can not seem
to get the path and file name that I chose. If I use wdDialogFileOpen I can
get the name and path of the file, but then word opens the file. I do not
want word to open it. I want to do some searching of the text and insert
certain things found in that file via code.

Thank, you
Clint Clark

Mon, 21 Jul 2003 01:51:24 GMT  
 Display Dialog to find file name & path
Ok du.
I figured it out. Use the Dialogs(wdDialogFileOpen).Display method instead
of .Show

For any other newbies out there I used this line of code to get the full
path and file name.
    Set FileDLG = Dialogs(wdDialogFileOpen)

    With FileDLG
        .Name = "*.txt"
        If .Display = -1 Then
            MsgBox WordBasic.FileNameInfo$(.Name, 1)
        End If
    End With

Mon, 21 Jul 2003 01:59:48 GMT  
 [ 2 post ] 

 Relevant Pages 

1. File name & path from Save As dialog

2. Using Dialog Box to get File Name and Path

3. show save as dialog with default doc path but current file name

4. Long Path Names give Runtime error 76 - Path not found

5. Reading Path & File name as variable

6. Help: How to use common dialog box to pick a path name

7. Common Dialog -Save - Get Path Name?

8. How do use common dialog to get a path name

9. Displaying picture from a path name

10. Common Dialog for finding Path

11. Couldn't find net path or user name

12. Common Dialog & Paths


Powered by phpBB® Forum Software