For some reason, my email signature keeps showing up before the body of the email.
Not sure how to fix it.
If you can fix or have a better code, please share
Thank you
Sub Print()
Dim outlook As Object
Dim newEmail As Object
Dim xInspect As Object
Dim pageEditor As Object
Set outlook = CreateObject("Outlook.Application")
Set newEmail = outlook.CreateItem(0)
With newEmail
.To = "Gordon.Mark@metrolinx.com; Glenn.Griffith@metrolinx.com"
.CC = "busfleetsupervisorswest@metrolinx.com; busfleetsupervisorseast@metrolinx.com; BusTechSupportSpecialists@metrolinx.com; BusEngineering@metrolinx.com"
.BCC = ""
.Subject = ActiveSheet.Range("B5").Text + " - Vendor Request - " + ActiveSheet.Range("B4").Text
.display
Set xInspect = newEmail.GetInspector
Set pageEditor = xInspect.WordEditor
ActiveSheet.Range("A1:B25").Copy
pageEditor.Application.Selection.Start = Len(.Body)
pageEditor.Application.Selection.End = pageEditor.Application.Selection.Start
pageEditor.Application.Selection.PasteAndFormat (wdFormatPlainText)
.display
Set pageEditor = Nothing
Set xInspect = Nothing
End With
Set newEmail = Nothing
Set outlook = Nothing
End Sub
Not sure how to fix it.
If you can fix or have a better code, please share
Thank you
Sub Print()
Dim outlook As Object
Dim newEmail As Object
Dim xInspect As Object
Dim pageEditor As Object
Set outlook = CreateObject("Outlook.Application")
Set newEmail = outlook.CreateItem(0)
With newEmail
.To = "Gordon.Mark@metrolinx.com; Glenn.Griffith@metrolinx.com"
.CC = "busfleetsupervisorswest@metrolinx.com; busfleetsupervisorseast@metrolinx.com; BusTechSupportSpecialists@metrolinx.com; BusEngineering@metrolinx.com"
.BCC = ""
.Subject = ActiveSheet.Range("B5").Text + " - Vendor Request - " + ActiveSheet.Range("B4").Text
.display
Set xInspect = newEmail.GetInspector
Set pageEditor = xInspect.WordEditor
ActiveSheet.Range("A1:B25").Copy
pageEditor.Application.Selection.Start = Len(.Body)
pageEditor.Application.Selection.End = pageEditor.Application.Selection.Start
pageEditor.Application.Selection.PasteAndFormat (wdFormatPlainText)
.display
Set pageEditor = Nothing
Set xInspect = Nothing
End With
Set newEmail = Nothing
Set outlook = Nothing
End Sub