Quantcast
Channel: Excel IT Pro Discussions forum
Viewing all articles
Browse latest Browse all 11829

VBA Code To Display Email Instead Of Automatically Send

$
0
0

I currently have a VBA code which selects a custom range and then emails said selected range to a list of E-mails I have in another worksheet. I've attached code, but this code is copied and pasted 8 times (there are 8 blocks)...Idk if that matters but just thought I should give as much information as possible. These are my two problems:

1) How to Display the email window on Outlook instead of automatically send (I've already tried .Item.Display and it does not work, so any alternatives or any other methods please recommend)
2) How to have the selected range keep its format (some of the text is red but once sent in an e-mail is displayed as default text).

Thanks in advance.

     For Each aCell In Worksheets("Email List").Range("B3:B" & Cells(Rows.Count, "B").End(xlUp).Row)
            If aCell <> "" Then
                    eTo = eTo & aCell & ";"
                End If
    Next
     eTo = Left(eTo, Len(eTo) - 1)
   If IsEmpty(Range("B4")) Then
   Else
      ActiveSheet.Range("a3", ActiveSheet.Range("e3").End(xlDown)).Select
      ActiveWorkbook.EnvelopeVisible = True
   With ActiveSheet.MailEnvelope

      .Item.To = eTo
      .Item.Subject = "Allocations -  Barclays" & Format(Date, " mm/dd/yyyy")
      .Item.Send
   End With
   End If


Viewing all articles
Browse latest Browse all 11829

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>