VBA to paste from Clip Board onto an Outlook email.

OzPanda

New Member
Joined
Mar 1, 2012
Messages
19
Hi Guys

I need help with the VBA.

Here is what I have so far. THe first few lines copys some rows in excel (some rows are hidden, filtered out in a filtered cells by the way)

I don't know how do I paste this into the body of the email??

I tried searching online but it came back with really complex solutions that I just don't know how to implement.

Thanks in advance for any advice or help!

VBA Code:
Sub GenEmail()
    'Copy the Table to Clip Board
    Sheets("Summary").Select
    Range("A4").Select
    Range(Selection, Selection.End(xlToRight)).Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy

    'Generate new email
     Dim OutApp As Object

     Dim OutMail As Object

     Set OutApp = CreateObject("Outlook.Application")

     Set OutMail = OutApp.CreateItem(0)

     On Error Resume Next

    

         Signature = OutMail.Body

    

     With OutMail

     .to = "mysummermail@gmail.com"

     .CC = ""

     .BCC = ""

     .Subject = "Summary of Update please action" & Range("SubjectDate").Value

     .Body = "Dear all,"

     '.Attachments.Add ("C:\Test.txt")

     .Display

     ' .Send

     End With

     On Error GoTo 0

     Set OutMail = Nothing

     Set OutApp = Nothing


End Sub
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Forum statistics

Threads
1,214,989
Messages
6,122,622
Members
449,093
Latest member
catterz66

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top