Using CDO and trying to add multiple attachments...

  • Thread starter Thread starter n_s_simpson
  • Start date Start date
N

n_s_simpson

Hi guys

I've nearly finished the program I'm working on. However please can
someone please tell me how I add multiple file attachments if I'm using
the following code to send email:

With iMsg
Set .Configuration = iConf
..To = "(e-mail address removed)"
..CC = ""
..Bcc = ""
..From = """Nick Simpson"" <[email protected]>"
..Subject = "Whatever"
..TextBody = "The usual"
..AddAttachment "" <<< I ASSUME IT'S HERE THAT NEEDS
ALTERING
'.AddAttachment filetoopen(2)
..Send
 
Oh one other question...

Is it possible to add hypertext into the body field?

I want to say that if you need Adobe Reader please download from...

Thanks again

Nick
 
Can anyone help with this query or will I need to use a completely
different method to email as required?

If there is another method please can someone point me in the right
direction?

Thanks again
 
Ok people I've found out how to send links in the body:

TextBody = "http://www.whatever.com/file.zip"

So my only outstanding query is how to send multiple files in one email
using CDO.

I tried to repeat the .AddAttachment line but that doesn't work.

Any ideas?

Nick
 
Repeat the line

.AddAttachment "C:\Data\file3.txt"
.AddAttachment "C:\Data\file1.txt"
 
Hi Ron

I am so annoyed with myself. I tried that first of all thinking it
would work and kept getting errors. It was late last night so was past
my best.

Just realised that I had an error in the path for the file!! That is so
frustrating but thanks for making me re-visit the same coding. It works
perfectly.

Nick
 
Hi people

My program seems to be working ok but one query is that when using CD
it seems to free up Excel before it's completely the subroutine.

This is a problem because I have a cancel button on my form which end
the program before it's sent the email.

Should it be doing this? I have got an idea of how to stop this issu
but want to make sure that it's supposed to do this first.

Thanks

Nic
 

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