word's built-in dialogs

darkforcesjedi
07-27-2001, 10:36 AM
How can I find the path to a file in the wdDialogFileOpen? Dialogs(wdDialogFileOpen).Name is just the filename ("filename.ext"). I need "C:\windows\desktop\filename.ext" (or whatever the selected file is).

BlueRaja
07-27-2001, 06:45 PM
Hi,

I am not sure how to get the path from the openfile dialog (i.e. the property of the dialog) but you can find the directory the dialog is pointing at with...

Options.DefaultFilePath (wdDocumentsPath)

If you say ...

msgbox Options.DefaultFilePath (wdDocumentsPath)

...this will display the contents of the 'Look in' box in Dialogs(wdDialogFileOpen)

If you want to point the dialog at a different path you can use...

ChangeFileOpenDirectory "C:\"

Hope this helps.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum