Add attachment to email

G

Guest

Hi all

I have the following code to add an attachment to an email:
If Not IsMissing(strFile) Then
.Attachments.Add (strFile)

I want to add another attachment and tried inserting this extra line
immediately below:
.Attachments.Add "\\DC2\ECSUK\IRS\Itinerary.MDB"

The attachment does not get added to the email though. Can you only do this
to attach one file?

Thanks in advance for any help.
Sue
 
A

Alex Dybenko

Hi,
normally you can do more then one
perhaps MDB - is a restricted file extension for sending and this is a
reason it does not add?
Anyway - I think better if you ask in Outlook group
 
G

Guest

Thanks, would help if I'd got my path correct ;-). I had missed a \ between
two directories and hadn't noticed. I thought the code would error if it
couldn't find the file but it doesn't. Anyway, working now so I am a happy
bunny :).

Just one other question - does anyone know if I can execute winzip from
within my code? Ideally I'd like to zip the MDB and attach the zipped file to
an email.

Thanks in advance for any help.
Sue
 

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