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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top