A
Alan
In a follow up to my earlier post re the possibility of
setting multiple file types (ie *.doc + *.rtf) in the
oopen file dialog I have tried to get around this with a
user form that offers 2 option boxes for DOC or RTF and a
GO button to load the dialog.
What I have for the GO button code is:
Private Sub btnGo_Click()
Dim sName As String
With Me
.Hide
If .optRTF.Value Then
sName = "*.rtf"
Else
sName = "*.doc"
End If
With Dialogs(wdDialogFileOpen)
.Name = sName
.Show
End With
End With
End Sub
but despite the fact that the sName variable and .Name
get set as expected the dialog box when shown only offers
the last file type set using Open in the normal way rather
than .rtf or .doc as set in the code above.
Can anyone suggest why?
setting multiple file types (ie *.doc + *.rtf) in the
oopen file dialog I have tried to get around this with a
user form that offers 2 option boxes for DOC or RTF and a
GO button to load the dialog.
What I have for the GO button code is:
Private Sub btnGo_Click()
Dim sName As String
With Me
.Hide
If .optRTF.Value Then
sName = "*.rtf"
Else
sName = "*.doc"
End If
With Dialogs(wdDialogFileOpen)
.Name = sName
.Show
End With
End With
End Sub
but despite the fact that the sName variable and .Name
get set as expected the dialog box when shown only offers
the last file type set using Open in the normal way rather
than .rtf or .doc as set in the code above.
Can anyone suggest why?