Gets the object representing the content type header.
Syntax:
Returns
If successful, an object of FREDI.mailContentType is returned; otherwise an empty result is returned.
Remarks:
The content type header has a field name "Content-Type". If this header does not currently exist in the message, it is added and the object is returned by the method.
Example
Dim oEdiDoc As Fredi.ediDocument
Dim oMailDocument As Fredi.mailDocument
Dim oContentType As Fredi.mailContentType
Dim oMessage 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 containing the EDI data.
oMailDocument.Load App.Path & "\SampleMail.TXT"
' Get the top message.
Set oMessage = oMailDocument.GetMessage
' Get the content-type header.
Set oContentType = oMessage.GetContentType
' Change content-type to "plain/text"
oContentType.MediaType = "plain"
oContentType.SubType = "text"
oMailDocument.Save App.Path & "\Output.TXT"
MsgBox "Done"
Samples