Framework EDI Reference. Methods and Properties
mailMessage. Copy

Copies a message.

Syntax:

Returns:

If successful, an object of FREDI.mailMessage is returned; otherwise an empty result is returned.

Remarks:

The following properties are copied from the original message:

Example:

Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oMessage As Fredi.mailMessage
Dim oDuplicateMsg As Fredi.mailMessage

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

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

' Load the mail document
oMailDocument.Load App.Path & "\SampleMail.TXT"

' Get the message.
Set oMessage = oMailDocument.GetMessage

' Copy message.
Set oDuplicateMsg = oMessage.Copy

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

MsgBox "Message copied."