Framework EDI Reference. Methods and Properties
mailDocument. PutMailString

Appends or concatenates the sub string to an internal message string.

Syntax:

Parameters:

Returns

If successful returns 1; otherwise 0, if the operation failed.

Remarks

An internal string representing the contents, header and body, of the message is built using PutMailString by making a succession of calls with a sub string to add to the internal string.  The string is then processed as the subject message when LoadMailString is then called.

Example

Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim sMsg As String

' Create instance of Framework EDI.
Set oEdiDoc = New Fredi.ediDocument

' Get internet mail document object
Set oMailDocument = oEdiDoc.GetMailDocument

sMsg = "Date : 27 Aug 76 09:32 PDT" & vbCrLf
sMsg = sMsg & "From : Ken Davis <KDavis@This-Host.This-net>" & vbCrLf
sMsg = sMsg & "Subject : Re: The Syntax in the RFC" & vbCrLf
sMsg = sMsg & vbCrLf
' Put string in message.
oMailDocument.PutMailString sMsg

sMsg = "This is the body of this mail which must be separated from the" & vbCrLf
sMsg = sMsg & "headers by a NULL line." & vbCrLf
' Put string in message.
oMailDocument.PutMailString sMsg

' Prepare to apply changes.
oMailDocument.LoadMailString ""

oMailDocument.Save App.Path & "\Output.TXT"

MsgBox "Done"

Samples