Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / April 2006

Tip: Looking for answers? Try searching our database.

Retrieving the value from a dialog

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
DevalilaJohn - 14 Apr 2006 16:34 GMT
I need to capture the full path and name for a file selected from the file
open dialog.  I can get the dialog to display via the Dispaly option to
Dialogs(wdDialogFileOpen) and determine that the user hit OK, but how/where
do I find the data on the file selected?

Thanks for you assistance.

John
Greg Maxey - 14 Apr 2006 17:18 GMT
John,

I once found something similiar on the Word MVP site, but don't
remember where:

Sub ScratchMacro()
With Dialogs(wdDialogFileOpen)
 If .Display <> 0 Then
   MsgBox WordBasic.FilenameInfo(.Name, 1)
 Else
   MsgBox "No file selected"
 End If
End With
End Sub
DevalilaJohn - 14 Apr 2006 20:30 GMT
Thanks Greg, it's just what I needed

> John,
>
[quoted text clipped - 10 lines]
> End With
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.