View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Attach Files Listed in Columns with Email

Hi K

You can loop through the list and add the files
Here is a example that give you ideas
http://www.rondebruin.nl/mail/folder2/files.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"K" wrote in message ...
Hi all, I have data in Sheet("Emails") as below

D E ----columns
Email to Each Email to all----headings
C:\My Doc\David Terry.xls C:\ImpFile\Report.pdf
C:\My Doc\Suzan Jones.xlsx C:\ImpFile\Analysis.xlsm
C:\My Doc\Jim Carry.doc
C:\My Doc\Brian Ali.xlsm
C:\My Doc\Simon Johnes.gif

I got file paths in column D and E and I need macro on a button which
should create and display emails according to the numbers of file
paths in column D and attach each file (listed in column D) with each
email and then it should attach all the files listed in column E with
all emails. Please note again that macro should attach each file with
each email (listed in column D) and all files with each email (listed
in column E). For example according to above data macro should create
and display five emails as there are five file paths in column D and
attach each file listed in column D with each email and then there are
two file paths in column E so macro should attach both files with all
emails. I also want that macro should extarct the person's name from
the files which are listed in column D and put in "TO" section of
email, so one of the emails should look like, it should have "David
Terry.xls" file attach and it should also have both files attach which
are "Report.pdf" & "Analysis.xlsm" and in "TO" section of email macro
should extract name from file of column D (which will be the
characters before dot) so in this case "David Terry" and put this in
"TO" section of email. I hope i was able to explain my question.
Please can any friend can help.