How do I browse for and select a file on a Mac? I don't need to open
the selected file -- I need to capture the name of the file and return
it to the routine. GetOpenFileName would be perfect but it doesn't
exist for Mac... or does it? TIA --
---larry
Sub getfilename()
Dim dlgFileOpen As Word.Dialog
Dim lngResult As Long
Set dlgFileOpen = Word.Dialogs(wdDialogFileOpen)
lngResult = dlgFileOpen.Display
Select Case lngResult
Case -2, -1 ' close, OK ("Open")
MsgBox dlgFileOpen.Name
Case 0 ' cancel
MsgBox "user cancelled"
Case Else ' other command button
MsgBox "other command button, value " & CStr(lngResult)
End Select
Set dlgFileOpen = Nothing
End Sub
Peter Jamieson