Email from form with multiple attachements

P

Paul

Hi,

I would like to be able to make an email starting from a client form. On
this form I select a directory with .doc, .jpg and .pdf files. They must open
up in a combo box. I then want to select one or more files to be attached to
this email.

Is this possible in any way and can someone give me some help with the code?

Cheers

Paul
 
A

Arvin Meyer [MVP]

This code will send 1 attachment to 1 or more recipients:

http://www.datastrat.com/Code/MultipleEmail.txt

Here is the code from above that sends the attachment:

If Not IsMissing(varAttachment) Then
.Attachments.Add varAttachment
End If

What you'll need to do it set up a loop inside the If ... Then statement to
add additional attachments. That leaves us with the use of a combo box. You
can only select 1 item at a time with a combo box, so either the code fills
a string array of paths, or you use a temp table to temporarily store your
choices, or you use a multi-select list box to fill your loop. I don't use
Outlook on this machine, so I can't write and test the code.
 

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

Top