The three commands Open document, Create document, and Append document enable you to access a document using the standard Open or Save file dialog boxes. When you access a document through a standard dialog, 4D returns the full pathname of the document in the "Document" system variable.
With the "Document" variable, you could do something like this:
$docID:=Open document("") `display the standard open dialog
`extractName is a method which parses the path and grabs the name of the file