ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using CDO and trying to add multiple attachments... (https://www.excelbanter.com/excel-programming/354664-using-cdo-trying-add-multiple-attachments.html)

n_s_simpson[_5_]

Using CDO and trying to add multiple attachments...
 

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 = "
..CC = ""
..Bcc = ""
..From = """Nick Simpson"" "
..Subject = "Whatever"
..TextBody = "The usual"
..AddAttachment "" <<< I ASSUME IT'S HERE THAT NEEDS
ALTERING
'.AddAttachment filetoopen(2)
..Send


--
n_s_simpson
------------------------------------------------------------------------
n_s_simpson's Profile: http://www.excelforum.com/member.php...o&userid=31859
View this thread: http://www.excelforum.com/showthread...hreadid=517563


n_s_simpson[_6_]

Using CDO and trying to add multiple attachments...
 

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


--
n_s_simpson
------------------------------------------------------------------------
n_s_simpson's Profile: http://www.excelforum.com/member.php...o&userid=31859
View this thread: http://www.excelforum.com/showthread...hreadid=517563


n_s_simpson[_7_]

Using CDO and trying to add multiple attachments...
 

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


--
n_s_simpson
------------------------------------------------------------------------
n_s_simpson's Profile: http://www.excelforum.com/member.php...o&userid=31859
View this thread: http://www.excelforum.com/showthread...hreadid=517563


n_s_simpson[_8_]

Using CDO and trying to add multiple attachments...
 

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


--
n_s_simpson
------------------------------------------------------------------------
n_s_simpson's Profile: http://www.excelforum.com/member.php...o&userid=31859
View this thread: http://www.excelforum.com/showthread...hreadid=517563


Ron de Bruin

Using CDO and trying to add multiple attachments...
 
Repeat the line

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



--
Regards Ron de Bruin
http://www.rondebruin.nl


"n_s_simpson" wrote in message
...

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


--
n_s_simpson
------------------------------------------------------------------------
n_s_simpson's Profile: http://www.excelforum.com/member.php...o&userid=31859
View this thread: http://www.excelforum.com/showthread...hreadid=517563




n_s_simpson[_9_]

Using CDO and trying to add multiple attachments...
 

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


--
n_s_simpson
------------------------------------------------------------------------
n_s_simpson's Profile: http://www.excelforum.com/member.php...o&userid=31859
View this thread: http://www.excelforum.com/showthread...hreadid=517563


n_s_simpson[_10_]

Using CDO and trying to add multiple attachments...
 

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

--
n_s_simpso
-----------------------------------------------------------------------
n_s_simpson's Profile: http://www.excelforum.com/member.php...fo&userid=3185
View this thread: http://www.excelforum.com/showthread.php?threadid=51756



All times are GMT +1. The time now is 12:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com