Hi
I had a similar problem and after hours of searching I found this code (VBScript) and modified it to suit my needs. It will send the contents of the selected fields (just 2 in this example) as the body of the email.
'=======
' The following function handler is created by Microsoft Office InfoPath.
' Do not modify the name of the function, or the name and number of arguments.
'=======
Sub SendData(eventObj)
Dim bStarted
Dim oOutlookApp
Dim oItem
Dim oBody
Dim oORacle
Dim oTitle
On Error Resume Next
Set oOutlookApp = GetObject(, "Outlook.Application")
If Err <> 0 Then
Set oOutlookApp = CreateObject("Outlook.Application")
bStarted = True
End If
Set oOracle = XDocument.DOM.selectSingleNode("//my:myFields/my:Oracle")
Set oTitle = XDocument.DOM.selectSingleNode("//my:myFields/my:Title")
oBody = "Oracle No:" & oOracle.text & " Scheme Title:" & oTitle.text
Set oItem = oOutlookApp.CreateItem(olMailItem)
With oItem
'Set the recipient
.To = "anyone@emailaddress"
'Set the recipient for a copy
'.CC = "
[email protected]"
'Set the subject
.Subject = "7 day notice"
'The content of the document is used as the body for the email
.Body = oBody
'Add the document as an attachment, you can use the .displayname property
'to set the description that's used in the message
'.Attachments.Add Source:=ActiveDocument.FullName, Type:=olByValue, _
' DisplayName:="Document as attachment"
.Send
End With
If bStarted Then
oOutlookApp.Quit
End If
Set oItem = Nothing
Set oOutlookApp = Nothing
End Sub
Hope this helps
Gary