Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Location
    Bristol, Avon, England
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Sending a sheet as the body of an email (2002)

    What I want to do is find the VBA equivalent of the following process.

    Choose File | Send to | Mail recipient - and then choose Send the current sheet as the message body.

    ie send the sheet as HTML body of an email using outlook.

    Any offers?

  2. #2
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Quakertown, PA, Pennsylvania, USA
    Posts
    517
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending a sheet as the body of an email (2002)

    Wow. Now you will have TOO many choices to choose from:

    http://www.mrexcel.com/board/viewtopic.php...ic=7311&forum=2

  3. #3
    2 Star Lounger
    Join Date
    May 2002
    Location
    Bristol, Avon, England
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending a sheet as the body of an email (2002)

    Arrgghh. Information overload

    All very useful though, thanks <img src=/S/kiss.gif border=0 alt=kiss width=34 height=15>

  4. #4
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending a sheet as the body of an email (2002)

    This is what I use,

    <pre>Sub MailActiveSheet()
    On Error Resume Next
    Dim strPath As String
    resp = MsgBox("This will email the active sheet. Proceed?", vbOKCancel)
    If resp = vbCancel Then Exit Sub
    strPath = ActiveWorkbook.Path
    If Right(strPath, 1) <> "" Then
    strPath = strPath & ""
    End If
    ActiveSheet.Copy
    With Cells
    .Copy
    .PasteSpecial xlPasteValues
    End With
    [A1].Select
    Application.DisplayAlerts = False
    ActiveWorkbook.SaveAs Filename:=strPath & ActiveSheet.Name
    Application.DisplayAlerts = False
    ActiveWorkbook.SendMail Recipients:=""
    Application.ScreenUpdating = True
    ActiveWorkbook.Close
    End Sub
    </pre>


  5. #5
    2 Star Lounger
    Join Date
    May 2002
    Location
    Bristol, Avon, England
    Posts
    110
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending a sheet as the body of an email (2002)

    Thanks Mike,

    Although that works, it was not what I was after.
    Your method still ends up sending an excel attachment on an email.

    What I am after is the code for sending the sheet as the body of an HTML format email. This is then not editable by the recipient as they are not actually getting a 'spreadsheet'. Just an image of one.
    Hope that makes sense.

  6. #6
    5 Star Lounger
    Join Date
    Feb 2001
    Location
    Dallas plus 20 miles or so, Texas, USA
    Posts
    876
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Sending a sheet as the body of an email (2002)

    Sorry, should have read your post better.

Posting Permissions

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