+ Reply to Thread
Results 1 to 2 of 2

Sending Multiple Emails from Excel with Lotus Notes

  1. #1
    Registered User
    Join Date
    04-12-2011
    Location
    Grand Rapids
    MS-Off Ver
    Excel 2003
    Posts
    4

    Sending Multiple Emails from Excel with Lotus Notes

    Loop to email one row of data to an email address
    I am trying to create a macro that will send the header row (a1:p1) with a second row of data for a different email addresses. Mail being sent thru lotus. MSOffice 2007.

    Email address for recipient is located in column Q. I want to create a loop (currently a counter) the will send and email to the address located in cell Qs, with the data contained on the same row A thru P.

    My first obstacle was to get an email generated with data from excel and send. I found the code in this forum. I have been trying to figure out how to loop thru each row. I am attempting to use a counter. This may not be the best because I really just like to start sending data from row 2, 3 .... until no data exist. right now it is coded to send the data from rows 2 thru 5.

    But. currently I have some type of code issue in red below; (run-time error '1004'application defined or object defined error). I have never coded in vba and am pretty sure it is a syntax issue.

    .FieldSetText "EnterSendTo", Sheets("Sheet1").Range(Q, counter).Value

    Any thoughts regarding this code? I really appreciate insight because this macro will streamline my job.

    thanks in advance. love this forum.



    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    04-27-2011
    Location
    Idaho, US
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Sending Multiple Emails from Excel with Lotus Notes

    By using "Q" in your range, are you trying to reference column Q?

    If so, it needs the column number. And change your range references to Cells([Row Number],[Column Number])

    For example:

    Change
    Sheets("Sheet1").Range(Q, counter)

    To
    Sheets("Sheet1").Cells(counter,17)

    And Change
    Sheets("Sheet1").Range(Cells(a, counter), Cells(p, counter))

    To
    Sheets("Sheet1").Range(Cells(counter,1), Cells(counter,16))
    Last edited by Brown207; 04-27-2011 at 02:29 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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