Mandy Lott
New Member
Hello,
My code works fine however when it copies the range and paste it in the email, the format is all messed up and I have tried everything to fix it. Please see the example I posted of what it should look like verse what it is looking like
My code works fine however when it copies the range and paste it in the email, the format is all messed up and I have tried everything to fix it. Please see the example I posted of what it should look like verse what it is looking like
Code:
Sub Send_Email()
Dim r As Range
Set r = Range("B1:U17")
Dim outlookApp As Outlook.Application
Set outlookApp = CreateObject("Outlook.Application")
Dim OutMail As Outlook.MailItem
Set OutMail = outlookApp.CreateItem(olMailItem)
Dim StrFileName As String
Application.DisplayAlerts = False
Application.ScreenUpdating = False
Sheets("Agent Detail").Select
ActiveSheet.Outline.ShowLevels RowLevels:=8, ColumnLevels:=8
r.Select
r.Copy
OutMail.Display
Dim rngDoc As Range
Set email = OutMail.GetInspector.WordEditor
With OutMail
.To = "[EMAIL]none@none.com[/EMAIL]"
.Subject = "Agent Details"
.Body = "Hi everybody,"
.Display
End With
email.Range.InsertAfter vbCrLf
Set ran = email.Range(email.Content.End - 1, email.Content.End - 1)
ran.PasteAndFormat wdChart
End Sub[code]
<Edited>
Attachments
Last edited by a moderator: