Hey,
The MailEnvelope object does not expose the Intro property. However, the EmailAdapter object does expose the Intro Property.
You can access the EmailAdapter object via XDocument.DataAdapters("Name of data adapter")
Alternatively, you can program directly to Outlook which will create an email message but not send it directly (but you can only attach a MHT version of the form in the email)....the following was written in VBScript:
Sub CreateMailMsg(sTo, sCC, sBCC, sSubj, sBody, sAttachFile)
'purpose creates an outlook message and attaches the MHT file created above
'date 04/19/2006
Dim objOlApp
Dim objItm
Set objOlApp = CreateObject("Outlook.Application")
Set objItm = objOlApp.CreateItem(olMailItem)
With objItm
.To = sTo
.CC = sCC
.BCC = sBCC
.Subject = sSubj
.Body = sBody
.Attachments.Add sAttachFile
.Display
End With
End Sub
Function CreateMHT(sFormNum)
'purpose to create a MHT web file of the form with its data for the user
'date 4/13/2006
Dim wshShell,oFileSys, filePath, sFormFile, myDocs, sFile, sDate
'unique name for file
sDate = Year(Now) & Month(Now) & Day(Now) & "_" & Hour(Now) & Minute(Now) & Second(Now)
sFile = sFormNum & "_" & sDate & ".mht"
Set wshShell = Createobject("WScript.Shell")
'path to user's data
myDocs = wshShell.SpecialFolders("MyDocuments")
filePath = myDocs & "\Forms\"
'check if path file exists
Set oFileSys = CreateObject("Scripting.FileSystemObject")
If oFileSys.FolderExists(filePath) Then
sFormFile = filePath & sFile
Else
sFormFile = myDocs & sFile
End if
'check to see if the file exists - if it does, overwrite it
If oFileSys.FileExists(sFormFile) Then
oFileSys.DeleteFile sFormFile, True
end if
'create the mht file - needs digital certificate to do this
XDocument.View.Export sFormFile, "MHT"
CreateMHT = sFormFile
End Function
Hope that helps!
MB