Hi..
Try this.. it will allow you to see any filetype in the browse Dialogue... if you want.. you can restrict what shows by changing the 4th line of code..
Private Sub CommandButton1_Click()
Dim OutApp, OutMail As Object
Dim wbFullName As Variant
wbFullName = Application.GetOpenFilename("All Files (*.*), *.*")
If wbFullName = False Then
Exit Sub
End If
On Error Resume Next
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = Cells(2, 2).Value
.Subject = "Test"
.Attachments.Add (wbFullName)
.Display 'Or use .Send
End With
On Error GoTo 0
Set OutMail = Nothing
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
End Sub
Bookmarks