+ Reply to Thread
Results 1 to 1 of 1

Excel range in picture to outlook email using VBA??

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    12-14-2012
    Location
    Perth
    MS-Off Ver
    Excel 2010
    Posts
    208

    Excel range in picture to outlook email using VBA??

    Hi guys,

    I got the below code from the following link: http://www.rondebruin.nl/win/s1/outlook/bmail3.htm

    It does work but kinda break the format.

    I wonder if there is any way to copy and paste the excel selection in picture (image) in Outlook?

    I have attached the sample file below.

    Many thannks.

    Sub Send_Range_Or_Whole_Worksheet_with_MailEnvelope()
    'Working in Excel 2002-2013
        Dim AWorksheet As Worksheet
        Dim Sendrng As Range
        Dim rng As Range
    
        On Error GoTo StopMacro
    
        With Application
            .ScreenUpdating = False
            .EnableEvents = False
        End With
    
        'Fill in the Worksheet/range you want to mail
        'Note: if you use one cell it will send the whole worksheet
        Set Sendrng = Worksheets("Sheet1").Range("A1:B15")
    
        'Remember the activesheet
        Set AWorksheet = ActiveSheet
    
        With Sendrng
    
            ' Select the worksheet with the range you want to send
            .Parent.Select
    
            'Remember the ActiveCell on that worksheet
            Set rng = ActiveCell
    
            'Select the range you want to mail
            .Select
    
            ' Create the mail and send it
            ActiveWorkbook.EnvelopeVisible = True
            With .Parent.MailEnvelope
    
                ' Set the optional introduction field thats adds
                ' some header text to the email body.
                .Introduction = "This is test mail 2."
    
                With .Item
                    .To = "ron@debruin.nl"
                    .CC = ""
                    .BCC = ""
                    .Subject = "My subject"
                    .Send
                End With
    
            End With
    
            'select the original ActiveCell
            rng.Select
        End With
    
        'Activate the sheet that was active before you run the macro
        AWorksheet.Select
    
    StopMacro:
        With Application
            .ScreenUpdating = True
            .EnableEvents = True
        End With
        ActiveWorkbook.EnvelopeVisible = False
    
    End Sub
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Copy and paste Excel range as picture into Outlook email body using excel vba
    By ExcelDoc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-17-2016, 09:29 PM
  2. send selected range in email with default outlook email signature included
    By mdsickler in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-04-2013, 10:50 PM
  3. [SOLVED] sending Email (via outlook) from Excel with cell range and image from external file
    By Kramxel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-20-2012, 11:10 AM
  4. Email Data Range from Excel using Outlook
    By ameyabrid in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-09-2011, 04:47 PM
  5. Email Range of Cells with a picture
    By paxile2k in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-10-2011, 11:52 AM

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