![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hello,
I am trying to send an email from a spread sheet. Below is what i have done so far but what I want to do is select the values in A1 (A1 is the email address) and send the email then select the value in A2 (A2 is the next email address) and send the email and so on but i have to stop after sending 200 emails even though i have about 3000 in the excel spread sheet. The cc address and bcc address will be the same every time. Sub SENDMAIL() Dim olApp As Object Dim olNs As Object Dim olMail As Object Dim Email_Address Dim ExcApp As Object Dim Excval As String Set ExcApp = Application.CreateObject("excel.application") Set ExcWb = ExcApp.Workbooks.Open("C:\users\XXX\mailing\send.x ls") Excval = ExcWb.sheets("sheet1").Range("A1").Value On Error Resume Next Set olApp = GetObject(, "Outlook.Application") Set olNs = olApp.GetNamespace("MAPI") Set olMail = olApp.CreateItem(olMailItem) With olMail .To = Excval .CC = " '.BCC = " .Subject = "We test and test" .Body = "another test two" .Attachments.Add "c:\users\XXX\Mailing\test.txt" .Send End With Set olMail = Nothing Set olApp = Nothing End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Check boxes in spreadsheet not lined-up when sent in email | bmnjna2019 | Outlook - Using Forms | 1 | October 29th 08 01:43 PM |
need to send e-mail to addresses listed in spreadsheet | cinnie | Outlook - Using Contacts | 1 | August 14th 07 09:04 PM |
Using email addresses from an Excel spreadsheet? | Jan | Outlook Express | 3 | October 4th 06 01:37 PM |
Sending email from source Excel spreadsheet | Richard Edwards | Outlook - General Queries | 1 | August 9th 06 07:15 PM |
How can I send a spreadsheet with email? | Dr.Jon | Outlook - Installation | 4 | June 29th 06 12:09 AM |