+ Reply to Thread
Results 1 to 2 of 2

Mail To Receipents list

  1. #1
    Forum Contributor
    Join Date
    12-07-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    117

    Unhappy Mail To Receipents list

    Hi Guys,

    I have below macro works fine for sending emails, but i have about 200 different people on Excel sheet. Email addresses are on Column B2:B202
    I need to add the missing codes in order to read B2:B202 mail addresses.

    Could anyone help please?
    Thanks
    Benjamin





    Sub Mail_Outlook_With_Signature_Html()
    ' Don't forget to copy the function GetBoiler in the module.
    ' Working in Office 2000-2010
    Dim OutApp As Object
    Dim OutMail As Object
    Dim strbody As String
    Dim SigString As String
    Dim Signature As String

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)

    strbody = ""

    'Use the second SigString if you use Vista as operating system

    SigString = "C:\Documents and Settings\" & Environ("username") & _
    "\Application Data\Microsoft\Signatures\Mysig.htm"

    'SigString = "C:\Users\" & Environ("username") & _
    "\AppData\Roaming\Microsoft\Signatures\Mysig.htm"

    If Dir(SigString) <> "" Then
    Signature = (SigString)
    Else
    Signature = ""
    End If

    On Error Resume Next
    With OutMail
    .To = ""
    .CC = ""
    .BCC = ""
    .Subject = "/ Important: Change on Payment Terms "
    .HTMLBody = strbody & "<br><br>" & Signature
    'You can add files also like this
    '.Attachments.Add ("C:\test.txt")
    .Send 'or use .Display
    End With

    On Error GoTo 0
    Set OutMail = Nothing
    Set OutApp = Nothing
    End Sub

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Mail To Receipents list

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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