Hi all, please help
I have the below code that creates a an email with subject and email address, I do not need/want a signature so its all good, but i cant get it to Copy and paste a set range from the Active Sheet in Excel. it has to be as text, not a picture as it needs to be read in by another IT system. if i can get this working i would like to be able to get it to loop though all sheets but that is not bestial.
I have the below code that creates a an email with subject and email address, I do not need/want a signature so its all good, but i cant get it to Copy and paste a set range from the Active Sheet in Excel. it has to be as text, not a picture as it needs to be read in by another IT system. if i can get this working i would like to be able to get it to loop though all sheets but that is not bestial.
VBA Code:
Sub sendMail()
ActiveSheet.Select
Dim objOutlook, objMsg, objNameSpace, objFolder, strOutput, strSubject, StrMsg
StrMsg = ActiveSheet.Range("c6:c17").Copy
StrSbj = "weekly report"
Const olMailItem = 0
Set objOutlook = CreateObject("Outlook.application")
Set objNameSpace = objOutlook.GetNameSpace("MAPI")
Set objMsg = objOutlook.CreateItem(olMailItem)
objMsg.To = "xxxxx@xxxxx.com"
objMsg.Display
objMsg.Body = StrMsg
objMsg.Subject = StrSbj
Set objFolder = Nothing
Set objNameSpace = Nothing
Set objOutlook = Nothing
Set objMsg = Nothing
Set Sendrng = ActiveSheet.Range("c6:c17")
Set ss = CreateObject("WScript.Shell")
End Sub