| |||||||
This is a discussion on Emailing reds within the How to get greens forums, part of the Freebie Chat category; I have been emailing reds for quite a while now, with some but little succes. I have been toying with ...
![]() |
| | Thread Tools |
| | #1 |
| iBook | Emailing redsI have been emailing reds for quite a while now, with some but little succes. I have been toying with making this process a bit easier, so I have been toying with Macros using Microsoft Excell Basically, you create a macro in Excel using the following code. Then you export your list of reds from FJ for e.g. and format the colums so that column A is blank, column B has the email address and column C has the word yes in it. (the yes is for yes i want to send this person an email) you then run the macro and it will work its way through line by line sending each one an individual email. I have only used this in excel with outlook as the mail client, but may also work for outlook express and windows live mail, i dont know Hope this helps some of you. (Im not taking full credit for this, I have 'borrowed' code from the tinterweb and pieced bits and pieces together) ------Code----- Sub sendmail() Dim OutApp As Object Dim OutMail As Object Dim cell As Range Application.ScreenUpdating = False Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon On Error GoTo cleanup For Each cell In Columns("B").Cells.SpecialCells(xlCellTypeConstant s) If cell.Value Like "?*@?*.?*" And _ LCase(Cells(cell.Row, "C").Value) = "yes" _ And LCase(Cells(cell.Row, "D").Value) <> "send" Then Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .To = cell.Value .Subject = "Reminder" .Body = "Hi " & Cells(cell.Row, "A").Value _ & vbNewLine & vbNewLine & _ "Modify here to enter your message " & _ "continue your message here" 'You can add files also like this '.Attachments.Add ("C:\test.txt") .Send 'Or use Display End With On Error GoTo 0 Cells(cell.Row, "D").Value = "send" Set OutMail = Nothing End If Next cell cleanup: Set OutApp = Nothing Application.ScreenUpdating = True End Sub Last edited by grabrail; 04-02-10 at 11:02 PM.. |
|
![]() |
| Thread Tools | |
| |