G
goshute
How do I paste cells from Excel into a custom message form? I do not
want to send an attachment.
I have everthing else worked out.
I would like to copy certain cells in Excel then paste into the body
after vSect1 and send the e-mail.
I have copied this from the macro recorder in Outlook but do not know
what to do with it if anything.
Selection.PasteExcelTable False, False, False
Selection.TypeParagraph
Here is the code I do have:
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
Set myNameSpace = objOutlook.GetNamespace("MAPI")
Set myOutBox = myNameSpace.GetDefaultFolder(olFolderOutbox)
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(strName)
objOutlookRecip.Type = olTo
.Subject = "Test Sub"
.Body = vSect1 & vbCrLf & vSect2
.Save
.Move myOutBox
End With
want to send an attachment.
I have everthing else worked out.
I would like to copy certain cells in Excel then paste into the body
after vSect1 and send the e-mail.
I have copied this from the macro recorder in Outlook but do not know
what to do with it if anything.
Selection.PasteExcelTable False, False, False
Selection.TypeParagraph
Here is the code I do have:
Set objOutlook = CreateObject("Outlook.Application")
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
Set myNameSpace = objOutlook.GetNamespace("MAPI")
Set myOutBox = myNameSpace.GetDefaultFolder(olFolderOutbox)
With objOutlookMsg
Set objOutlookRecip = .Recipients.Add(strName)
objOutlookRecip.Type = olTo
.Subject = "Test Sub"
.Body = vSect1 & vbCrLf & vSect2
.Save
.Move myOutBox
End With