+ Reply to Thread
Results 1 to 41 of 41

Mail sending througg macro

  1. #1
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Mail sending througg macro

    Hi All,

    I have a list of email address of about 1000 in an excel sheet. Now I have a content to send to all the email address. Even I can sent all the email at bulk. I need to send an email for every 2 minutes from the list. Is there any macro to do this?

  2. #2
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Mail sending through macro

    Hi All,

    I have a list of email address of about 1000 in an excel sheet. Now I have a content to send to all the email address. Even I can sent all the email at bulk. I need to send an email for every 2 minutes from the list. I am using MS office 2007 outlook. Is there any macro to do this?
    Last edited by sathishkm; 08-09-2013 at 03:33 PM.

  3. #3
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    Any macro for this?
    Last edited by sathishkm; 08-09-2013 at 05:07 PM.

  4. #4
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    Did anyone find the solution for this?

  5. #5
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Mail sending througg macro

    Read previous posts -- I have a post that was solved. Search by my username.

  6. #6
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    Wat is the post name?

  7. #7
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Mail sending througg macro

    I don't remember, I don't have that many threads I've actually created. Search by my username.

  8. #8
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    I Had tried your code. But I am getting the error in the code.

  9. #9
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Mail sending througg macro

    The code is completely finished. Copy and paste the code into an Excel VBA macro from my thread.

  10. #10
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    It is not working. I had took from your post" Access body email to Outlook "

  11. #11
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Mail sending througg macro

    You're looking at the wrong post. It's excel VBA to Outlook.

  12. #12
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Mail sending througg macro

    not to step on any toes but this works also....it may be the same as the other but I dont know....you'll have to insert your smtp server name....

    Please Login or Register  to view this content.
    Ernest

    Please consider adding a * if I helped

    Nothing drives me crazy - I'm always close enough to walk....

  13. #13
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    Where need to enter my smtp server name?

  14. #14
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Mail sending througg macro

    ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "Insert your SMTP Server name here"

  15. #15
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    It is not working. I had included my email domain name like " abcdef.com" in the " Insert your SMTP Server name here ". But I am unable to get the result.

  16. #16
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Mail sending througg macro

    that is probably not your SMTP server name....you have to go into outlook and look under account settings to find the actually server name....it will usually have SMTP in the name....not always....

  17. #17
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    I had given as " mail.domain.com". But then also my not working.

  18. #18
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    I had included my SMTP server name. But how to execute the code. I have 1000 emails in the excel sheet. Now I want to sent email to it for every 2 minutes.

  19. #19
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    Any solutions for this?

  20. #20
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    The previous code is send only email at once.

  21. #21
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Mail sending througg macro

    sorry.....I guess I thought you had that part done....

    you would have to create a loop the grabbed an email address, call the code I sent you with the email address as a parameter,wait 2 minutesm then keep going until you run out of email addresses...do you have any code that you have started/created?

  22. #22
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    I had not done it. And I am not so much familiar with coding. So if possible could you please modify this code?

  23. #23
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Mail sending througg macro

    where does the email addresses come from?....are they in an excel file?

  24. #24
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    The file will be in my desktop. In the sheet1 and the file name is Email.
    Last edited by sathishkm; 08-12-2013 at 05:59 PM.

  25. #25
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Mail sending througg macro

    so that would be a "Yes"....it's an Excel file....I can probably do some basic setup for you and let you sort of complete the rest....give me a bit time....

  26. #26
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    OK. I am struggling a lot for it. If I get good result. I will be very much happy.

  27. #27
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Mail sending througg macro

    so here is a basic outline...this will determine how many emails there are in column 1 of the active sheet (sheet1)....it will then loop through each email address and go into the sendemail sub and "pass" it the email to name....you will have to come up with your email name....what you want the subject to be...and what goes in the body and the SMTP server....then it comes back to the main sub and waits for the time you requested....currently it's 12 second....you can change it 120 for 2 minutes....and it will continue until the last email name....I would suggest you practice this with just your name in the email list so if it doesn't work right you would send out a bunch of weird emails....good luck....

    Please Login or Register  to view this content.

  28. #28
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    I am getting the error in the following line. Please find the details

    Public Sub SendEmails()

    Dim LastRow As Integer, x As Integer

    LastRow = Cells(65000, 1).End(xlUp).Row

    For x = 1 To LastRow
    EmailTo = Cells(x, 1).Value
    SendEmail EmailTo
    newMinute = Minute(Now())
    newSecond = Second(Now()) + 12
    waitTime = TimeSerial(newHour, newMinute, newSecond)
    Application.Wait waitTime
    Next

    End Sub

  29. #29
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Mail sending througg macro

    so, some basic questions....are you putting this in a module in the excel that has the emails?....are you on Sheet1?

    so you need to click on the stop box for running macros....it's a little to the right of the start button, which looks like a right arrow....

  30. #30
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    The error message I am receiving like this " Cant' execute code in break mode".

  31. #31
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    As per your I your instruction I had done the same. But the code is not executing.

  32. #32
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    My problem is. I had list of email address. For those email I have to do send the mails through outlook. And the content is same, but thing I want to change the email and send for each individual manually. I want this repeated task to be done by macro or a VB code.

  33. #33
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Mail sending througg macro

    so....you have the code sitting in module 1 of the excel file that has Sheet1 with email addresses in column 1....you have the VB editor and I would recommend pressing F8....this will step through the code and you can see what is happening....also...saying the code doesn't execute isn't real helpful....is there an error?....what does it do?..or not do?

  34. #34
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    In the last line of the code. I m getting the error message like" Can't execute code in break mode".

  35. #35
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Mail sending througg macro

    wait 15 seconds (unless you changed it 120) then wait 120 seconds... .... it's probably waiting for the wait statement to complete.....

  36. #36
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    I had entered my email address here

    objmessage.from = "[email protected]"


    and I had change to my subject here

    objmessage.Subject = " Welcome"

    objmessage.TextBody = "PUT TO INFOMATION FOR THE BODY OF THE EMAIL HERE"


    This is the only modifiction I had done. After doing these things. When I tried to executive. It is comes compile error.

  37. #37
    Forum Expert judgeh59's Avatar
    Join Date
    02-07-2013
    Location
    Boise, Idaho
    MS-Off Ver
    Excel 2016
    Posts
    2,310

    Re: Mail sending througg macro

    what is the error?

  38. #38
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    This is the error message I am getting it" At least one of the Form or sender fields is required, and neither was found."

  39. #39
    Forum Contributor
    Join Date
    06-20-2013
    Location
    Dallas, Texas
    MS-Off Ver
    Excel 2007
    Posts
    106

    Re: Mail sending througg macro

    Look here:
    http://www.excelforum.com/excel-prog...n-outlook.html

    This code should answer all your questions. Post #6 and #7.

  40. #40
    Forum Contributor
    Join Date
    06-17-2013
    Location
    australia
    MS-Off Ver
    Excel 2007
    Posts
    247

    Re: Mail sending througg macro

    http://www.rondebruin.nl/win/section1.htm

    May help you understand..

  41. #41
    Forum Contributor
    Join Date
    07-17-2012
    Location
    bangalore
    MS-Off Ver
    Excel 2007
    Posts
    461

    Re: Mail sending througg macro

    Did any could rectify this code?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro for sending Outlook mail - Need help
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-10-2013, 06:22 AM
  2. Macro for sending mail with attachment
    By shaifudheen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-06-2013, 04:55 AM
  3. Replies: 1
    Last Post: 12-28-2012, 03:46 AM
  4. Sending mail macro to multiple addresses
    By Raju Radhakrishnan in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-22-2012, 04:56 PM
  5. Macro For Sending Mail with Attachemnt
    By manian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2011, 01:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1