Attaching Files To Emails

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I get the following code to instead of attaching a file that I
specify in code to the email. I would like to make it open a browse screen so
that they can browse to a file for me at attach to the email.

With MailObject
.To = "EmailAddress"
.Subject = strFileName & " - " & Me.txtDescription
.Attachments.Add "c:\My Documents\book.doc"
.Display
End With

Thank you in advance.
 
Hi Ben,

you can use OLs file browser:

Dim oCb As Office.CommandBarButton

MailObject.Display
Set oCb = MailObject.GetInspector.CommandBars.FindControl(, 1079)
If Not oCb Is Nothing Then
oCb.Execute
End If
 
Back
Top