With Dialogs(wdDialogFileOpen)
.Name = "*.*"
.Show
End With
NewFile$ = ActiveWindow.Caption
' Noting the name of a file -- without opening it! With Dialogs(wdDialogFileOpen)
.Name = "*.*"
.Display
Dim NameVar As String
NameVar = .Name
FullNameOfDoc = CurDir & "\" & NameVar
FullNameOfDoc = ReplaceWithin(FullNameOfDoc, Chr(34), "") ' Requires the ReplaceWithin Function End With
' -- or --
Set DocPathIs = Dialogs(wdDialogFileOpen)
With Dialogs(DocPathIs)
.Name = "*.*"
If .Display = 0 Then
GoTo JUST_SKIP_IT
End If
DbaseFile = WordBasic.[FileNameInfo$](.Name, 1)
End With
' Other Examples: With Dialogs(wdDialogEditFind)
.Show
End With
With Dialogs(wdDialogFileOpen)' To get the name without opening the document If .Display = -1 Then
strDoctoUse = .Name
End If
End With
With Dialogs(wdDialogFileNew)
.Show
End With
Application.Dialogs(wdDialogFileOpen).Show' Short version -- works for ANY dialog