+ Reply to Thread
Results 1 to 1 of 1

Mail Pictures as Range

Hybrid View

  1. #1
    Registered User
    Join Date
    09-15-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Mail Pictures as Range

    Hello - I currently have a nicely working code to use mail envelope to send a range of cells in an email. The range currently holds a picture link of some other cells (the picture link updates as the other cells change) and a chart that also updates. My problem is that the email sends the range and looks perfectly fine on my iPhone and certain Blackberry's, however, some Blackberry's are showing the range (see below as CA3:CL37) as blank cells, thus lots of white space in the email. The older Blackberry's are showing the empty cells and not the picture and chart "on top" of them. I am hoping to somehow define the range I am sending to be just the actual picture and chart references. Please see my code below and let me know if you have any questions. I have bolded the line which I think needs to somehow reference the picture and chart. Thank you for any help!
        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("My Workshet").Range("CA3:CL37")
        'Remember the activesheet
        Set AWorksheet = ActiveSheet
    
        'Create the mail and send it
        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 = "Good Evening,"
    
                ' In the "With .Item" part you can add more options
                ' See the tips on this Outlook example page.
                With .Item
                    .SentOnBehalfOfName = """abc@abc.com"" abc"
                    .To = "abc@abc.com"
                    .Subject = "Test"
                    .Display
                    .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
    Application.DisplayAlerts = True
    ActiveWorkbook.Close True
    End Sub
    Last edited by Leith Ross; 09-15-2011 at 04:04 PM. Reason: Added Code Tags

+ 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