Getopenfilename In Word

  • Hi all,


    As the title says, i need some code that can do what getopenfilename does in excel which is to get the directory of a file.


    Note:


    I am not looking for this


    Dialogs(wdDialogFileOpen).Show


    I want to get the file directory of a file and not to open it.

  • Re: Getopenfilename In Word


    Do this help...

    Code
    With Application.FileDialog(msoFileDialogFolderPicker)
        .AllowMultiSelect = False
        .Title = "Select Folder for Formatted Schedules..."
        .Show
        targetfolder = .SelectedItems(1)
    End With
    
    
    MsgBox targetfolder

    D ;)


    :sailboat: [SIZE=1]Better a bad day on the water than a good day in the office[/SIZE]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!