Consulting

Results 1 to 4 of 4

Thread: Sending Email from Excel

  1. #1
    VBAX Regular
    Joined
    Nov 2005
    Posts
    13
    Location

    Sending Email from Excel

    Hey,

    I have a cell or cell range in microsoft excel. I want to automatically send an email to a specified adress with the contents of the email being the cell or cell range.

    Can anyone help me do this? The default email application is outlook. But can this be done otherwise?

    Thanks,
    dondark

  2. #2
    VBAX Tutor
    Joined
    May 2004
    Location
    Germany, Dresden
    Posts
    217
    Location
    You could try to modify this KB entry: http://vbaexpress.com/kb/getarticle.php?kb_id=311

    As this one uses MAPI it should work with Outlook as well as with MS Mail or another Standard Mail Client.

    If you don't want to send the whole workbook, just call it this way:
    [VBA]
    SendIt "me@here.com", "A new Document", ActiveCell.Value,""
    [/VBA]

  3. #3
    VBAX Regular
    Joined
    Nov 2005
    Posts
    13
    Location

    Executing Sub on Timed Basis

    Thanks a lot, man.

    One additional question, if I wanted to run a macro or sub procedure every 15 minutes, how could I do that?

  4. #4
    VBAX Mentor ALe's Avatar
    Joined
    Aug 2005
    Location
    Milan
    Posts
    383
    Location
    [VBA] Public scadenza
    Sub DoAction()

    MsgBox "Action"
    scadenza = Now + TimeSerial(0, 0, 5)
    Application.OnTime scadenza, "DoAction"

    End Sub

    Sub CancelAction()
    Application.OnTime earliesttime:=scadenza, Procedure:="DoAction", Schedule:=False

    End Sub[/VBA]

Posting Permissions

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