+ Reply to Thread
Results 1 to 3 of 3

Send Email from Macro VBA Excel

Hybrid View

  1. #1
    swesterm
    Guest

    Send Email from Macro VBA Excel

    I don't want to send a workbook. My coding is all set. I have the macro
    run, and if a certain value is reached, then I want to send an email out to 2
    people. Simple as that. But I can't figure out the coding. Will someone
    PLEASE answer me using my examples listed below?

    I want the subject of the email to say = "Value has been reached"
    I want to send the email to = "[email protected]" AND "[email protected]"
    I don't want any attachments OR body text.
    Just send it to certain people AND a subject heading.

    Can someone please help WITHOUT directing me to someone else's website?

    Thx

  2. #2
    STEVE BELL
    Guest

    Re: Send Email from Macro VBA Excel

    Check this site, Ron has some good stuff

    http://www.rondebruin.nl/tips.htm

    --
    steveB

    Remove "AYN" from email to respond
    "swesterm" <[email protected]> wrote in message
    news:[email protected]...
    >I don't want to send a workbook. My coding is all set. I have the macro
    > run, and if a certain value is reached, then I want to send an email out
    > to 2
    > people. Simple as that. But I can't figure out the coding. Will someone
    > PLEASE answer me using my examples listed below?
    >
    > I want the subject of the email to say = "Value has been reached"
    > I want to send the email to = "[email protected]" AND "[email protected]"
    > I don't want any attachments OR body text.
    > Just send it to certain people AND a subject heading.
    >
    > Can someone please help WITHOUT directing me to someone else's website?
    >
    > Thx




  3. #3
    Registered User
    Join Date
    08-18-2004
    Posts
    97
    Hi,


    You could use something like this: ( I have it running in my applicatin)

    ' Select the range of cells on the active worksheet.
       ActiveSheet.Range("B4:F49").Select
        Nombre= email.Text
        Asunto = Asunto.Text
        Intro = Intro.Text
        If Ccmail.Text = "inserte e-mail adicional (opcional)" Then
            ConCopia = ""
        Else
            ConCopia = Ccmail.Text
        End If
    
       ' Show the envelope on the ActiveWorkbook.
       ActiveWorkbook.EnvelopeVisible = True
    
       ' Set the optional introduction field thats adds
       ' some header text to the email body. It also sets
       ' the To and Subject lines. Finally the message
       ' is sent.
    
       With ActiveSheet.MailEnvelope
          .Introduction = Intro
          .Item.To = nombre
          .Item.Subject = Asunto
          .Item.CC = ConCopia
          .Item.Send
       End With
          
    End Sub
    You have to adjust it a little bit, but is the best answer i found, even better that the link provided in the last response ( I looked them all!!).


    Hope this helps


    Regards

    Jose Luis

    Quote Originally Posted by swesterm
    I don't want to send a workbook. My coding is all set. I have the macro
    run, and if a certain value is reached, then I want to send an email out to 2
    people. Simple as that. But I can't figure out the coding. Will someone
    PLEASE answer me using my examples listed below?

    I want the subject of the email to say = "Value has been reached"
    I want to send the email to = "[email protected]" AND "[email protected]"
    I don't want any attachments OR body text.
    Just send it to certain people AND a subject heading.

    Can someone please help WITHOUT directing me to someone else's website?

    Thx

+ 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