Home |
Search |
Today's Posts |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi there, I'm using your code you posted here. And it works when tha data in
column C are plain e-mail adresses. But problem is that my adresses in column C are "=concatenate(A1;B1)", so they are result of a formula. What should I change in the code to make it work? I'm not very familiar with VBA. Thanks. Milos Ron de Bruin pÃ*Å¡e: Hi Try this one with the e-mail addresses in "Sheet1" column C Visit also my site for more examples Sub Mail_workbook_Outlook() Dim OutApp As Object Dim OutMail As Object Dim cell As Range Dim strto As String For Each cell In ThisWorkbook.Sheets("Sheet1") _ .Columns("C").Cells.SpecialCells(xlCellTypeConstan ts) If cell.Value Like "*@*" Then strto = strto & cell.Value & ";" End If Next strto = Left(strto, Len(strto) - 1) Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) With OutMail .To = strto .CC = "" .BCC = "" .Subject = "This is the Subject line" .Body = "Hi there" .Attachments.Add ("C:\test.doc") .Send 'or use .Display End With Set OutMail = Nothing Set OutApp = Nothing End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "MrMan&Fam" wrote in message ... Say I have an Excel spreadsheet with one column of e-mail addresses. I want to send the same piece of e-mail (a WORD file) to each address. Is there an easy way? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Column A is Town, Column B is names. How can Excel add & tell how. | Charts and Charting in Excel | |||
How do I change an e-mail address in Excel? | Excel Discussion (Misc queries) | |||
How do I do a Mail Merge in Excel? | New Users to Excel | |||
How do I sort a column of formulas in Excel? | Excel Discussion (Misc queries) | |||
How do I sort a column of formulas in Excel? | Excel Discussion (Misc queries) |